Skip to content

Fix parsing when in detached HEAD state in Git::Lib#branches_all #641

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

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

jcouball
Copy link
Member

@jcouball jcouball commented Mar 4, 2023

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Fixes #510

When in a detached head state in any worktree, Git::Base#branches would raise an error because it is unable to parse the output from git branch -a in this condition.

This PR changes the parsing code to account for this situation.

Signed-off-by: James Couball <jcouball@yahoo.com>
@jcouball jcouball merged commit 536df08 into master Mar 4, 2023
@jcouball jcouball changed the title Fix parsing when in detached HEAD state in Git::Lib#branches_all Fix parsing when in detached HEAD state in Git::Lib#branches_all Mar 4, 2023
@jcouball jcouball mentioned this pull request Mar 4, 2023
@jcouball jcouball deleted the fix_branches_with_detached_head branch March 10, 2023 00:26
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 this pull request may close these issues.

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