-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix issue checking detached when git less than 2.22 #128
Conversation
// "branch --list" is more difficult when in a detached HEAD state. | ||
const args = ['rev-parse', '--symbolic']; | ||
// Note, this implementation uses "rev-parse --symbolic-full-name" because there is a bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i ran into this bug in git 2.18 when testing. Switching to --symbolic-full-name
and trimming refs/heads/
and refs/remotes/
from the output works around the issue.
@@ -4799,9 +4799,11 @@ class GitCommandManager { | |||
branchList(remote) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useful script for testing:
- run: |
cd ..
Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.18.0.windows.1/MinGit-2.18.0-64-bit.zip -OutFile mingit.zip
mkdir mingit
Expand-Archive -LiteralPath .\mingit.zip -DestinationPath .\mingit
dir .\mingit
echo "::add-path::$PWD\mingit\cmd"
fixes #121