Skip to content

HEAD detached... shows as a local branch (in g.branches.local) #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
costa opened this issue Jan 7, 2021 · 1 comment · Fixed by #641
Closed

HEAD detached... shows as a local branch (in g.branches.local) #510

costa opened this issue Jan 7, 2021 · 1 comment · Fixed by #641

Comments

@costa
Copy link
Contributor

costa commented Jan 7, 2021

Subject of the issue

HEAD detached... shows as a local branch (in g.branches.local)

Your environment

  • version of git and ruby-git: latest
  • version of ruby: latest

Steps to reproduce

  • go to a git repo dir
  • get in a "HEAD detached" state
  • Git.open('.').branches.local.map(&:gcommit).map &:message

Expected behaviour

list commit messages of local branches

Actual behaviour

Git::GitExecuteError (git '--git-dir=.../.git' '--work-tree=...' '-c' 'color.ui=false' cat-file 'commit' '(HEAD detached at ...)' 2>&1:fatal: Not a valid object name (HEAD detached at ...))

@stale
Copy link

stale bot commented Jan 9, 2022

A friendly reminder that this issue had no activity for 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants