-
-
Notifications
You must be signed in to change notification settings - Fork 172
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 resolving HEAD reference if it's a packed ref #613
Conversation
Eh, looks like the fix will need a bit of tweaking. At least we know the underlying cause though :) |
Commenter does not have sufficient privileges for PR 613 in repo dotnet/Nerdbank.GitVersioning |
83c9ddd
to
35141a1
Compare
Thanks for contributing, and especially for the repro steps. Are you planning to add the test case or should I find some time to do that? |
Also, we need to rebase your PR to the |
You will likely have better idea how to structure the test case than me so I would prefer if you look into it. I've uploaded an example repository in the linked issue so it should be fairly trivial to incorporate it somehow. Feel free to push to the branch as much as necessary. I can rebase it on top of the 3.4 branch but at the moment I am not anywhere near a computer 😅 It also got me thinking that aside from the actual problem that I fixed it would have been reasonable to update GetBuildVersion to either fail or at least issue a warning in the MSBuild task. Now it silently produces a version without the GIT fields in |
35141a1
to
4d8ecca
Compare
Thanks! |
Thank you very much for contributing the fix! |
The issue is that we have a repository that has HEAD pointing containing
ref: refs/heads/netcore/master
. All references are packed so to resolverefs/heads/netcore/master
it's necessary to looking into the packed refs and not just on the file system.Fixes #602