-
Notifications
You must be signed in to change notification settings - Fork 655
[Windows][Appveyor] InvalidSpecificationException: the given reference name '[branch]' is not valid #2134
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
Comments
I think the issue is that the branch contains |
@arturcic ugh, you might be right. Any idea why |
I think that's a question for Libgit2Sharp repo |
Confirmed this is the issue (a new PR submitted without containing |
If changing the name of the branch helps, I'd say that's a bug in GitVersion. Best case, we should handle that gracefully, worst case we should yield an understandable error message indicating that the name of the branch could be the perpetrator. |
@asbjornu I'd like to figure out why it's only failing on Windows too (as someone who has contributed to |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
@asbjornu nah, haven't even opened Windows since then |
same behavior on Jenkins :
Changing branch name from |
So the |
No the "refs" sub string is causing problem |
Ok, then I misunderstood this:
|
There is "refs" in "Prefs" 😄 |
Yikes! Right you are! I didn't even notice the removal of |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Just chiming in with more data on this in case it is helpful; I'd really appreciate this being looked at. This breaks quite a lot of builds for us, especially since developer branch names usually reference their work and we work with a lots of 'xrefs' in our code.
|
Given the stack trace, I would say this is a bug in LibGit2Sharp or perhaps even in libgit2. I at least have no idea how we can fix this in GitVersion. Pull requests and ideas are of course welcome. |
@asbjornu Understood & I'd be quite comfortable with this blocked by a corresponding issue on LibGit2Sharp - I am just not sure if I have the background information necessary to raise it. |
I wish I could help, but I'm not experienced in the LibGit2Sharp or libgit2 source code myself. |
Looking at the spec for This appears to be a bug at
Prior code & logging indicates that
which is not canonical. Running this code down to the repo.Refs.Add("fully-qualified-refs-fix", repoTipId.Sha); which will inevitably crash. Remove the repo.Refs.Add("refs/heads/fully-qualified-fix", repoTipId.Sha); Aside: This is likely why |
Thanks for the digging, @hotchkj! Perhaps more logging in that area of the GitVersion code may help figure out where the bug may be? |
Possibly more logs may help. I think the information this report is currently lacking is why this works in the general case but not on Windows. What I am curious about, and I suspect only the author of the relevant GitVersion code can answer, is what the following segment is expected to returned: GitVersion/src/GitVersionCore/Core/GitPreparer.cs Lines 79 to 93 in 72ee9ea
As far as I can tell from following the code through, the fault is either in the aforementioned GitVersionCore's All that said, it seems likely that the data is coming from a tool outside GitVersion's control, so it may just be better to harden the checking in |
That sounds like a very plausible cause, indeed!
Agreed! The search for |
If an upgrade of LibGit2Sharp helps with this problem, #2916 should prove useful. |
This has been properly solved with #3103. If this error still persists in version 6.x please let me know and re-open this issue. Thank you very much. |
🎉 This issue has been resolved in version 6.0.0-beta.2 🎉 Your GitReleaseManager bot 📦🚀 |
Hey Guys! 2023-05-29T10:25:13.0536713Z ERROR [05/29/23 10:25:12:96] An unexpected error occurred: |
Uh oh!
There was an error while loading. Please reload this page.
Version:
5.1.3
Really not sure what's going on here, but after trying a few different things I'm stumped:
The text was updated successfully, but these errors were encountered: