-
-
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
Allow disabling "g" prefix for commit hash in version number #260
Comments
It stands for git, and provides a more deterministic way to ascertain that what follows is the commit ID. I don't remember where it came from (I didn't invent the convention). I've heard this feedback several times though, and I sympathize with the inconvenience of not being able to just double-click to select the "word" and paste it somewhere else without having to trim off the leading I'm not sure anyone even likes the leading I'm planning some breaking changes for a 3.0 version, and changing this behavior (or at least the default) would be well-placed for the 3.0 version, I think. And perhaps we can add the option in 2.3, but change its default in 3.0. |
Anyone reading this issue should please vote up or down on the original issue description. I'm interested in comparing the vote count. |
So... now I know why the This works great (when the commit starts with a letter):
But when the commit starts with a number:
So, that stinks. I could still make it an option, or make the |
I think the approach to fix this should be that we remove the |
@AArnott how about we replace the This should still be compliant with SemVer1 rules. |
I would prefer a |
This removes `g` basically everywhere except for semver 1.0 compliant NuGet package versions, since older NuGet clients can't handle -prerelease tags that start with a digit (which some commit IDs do). For these, we still prefix the `g` as the convention to ensure that the prerelease tag starts with a letter. Fixes #260
Is this stil disableable?
I'm using cli to get the version: |
No @nosalan, the option to remove this was reverted. See earlier discussion for the problems that removing the prefix introduces. |
I've had multiple folks (including myself) be confused about the
g
in front of the commit sha of a version number like16.0.40-preview+ge6c3a1f9e4
.You don't immediately realize without knowing this convention that the
g
isn't part of the sha and wonder why you can't find the commit. Is there a reason for the prefix or could there be an option to turn it off?The text was updated successfully, but these errors were encountered: