Skip to content
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

Use git symbolic-ref to read the branch name for HEAD #2489

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

mislav
Copy link
Owner

@mislav mislav commented Mar 1, 2020

This affects reading the current branch as well as reading the default branch for a remote. Because we're no longer trying to read the ref manually from the filesystem, this approach works with git worktrees.

Fixes #2484, closes #2485

This affects reading the current branch as well as reading the default
branch for a remote. Because we're no longer trying to read the ref
manually from the filesystem, this approach works with git worktrees.
@csaska
Copy link

csaska commented Mar 1, 2020

Certainly more elegant than my hacks in #2485

Worked for me in clones on git@v1.7.0.

Worked for me in clones and worktrees on git@v2.6.0 and later.

@mislav mislav merged commit 6740f5c into master Mar 3, 2020
@mislav mislav deleted the git-symbolic-ref branch March 3, 2020 13:31
@csaska
Copy link

csaska commented Mar 3, 2020

Thank you for spending time on this!

@mislav
Copy link
Owner Author

mislav commented Mar 3, 2020

@csaska Well thank you for taking the first stab at the fix 🎉 Made it easier for me.

@Nabuwaah46
Copy link

Thank you for continuing to keep on fixing 'git symbolic-ref'

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.

Hub doesn't use my default base branch when executing pull-request cmd from worktrees
3 participants