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
Git tags after v5.6.3 are lightweight instead of annotated resulting in an incorrect submodule version #1087
Comments
Thanks Alex. Another Git usability fuckup. Who would have thought someone can screw up tags. The Git folks make it impossible to do simple things. If you can provide a script to fix things I will run it for you. |
A collaborator could run the following commands for each tag: # this is essentially: `git tag [-a ] [-f] <tagname> [<object>]` because a tag is an object
git tag -a -f <tagname> <tagname>
# Force is needed b/c: https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.2.txt#L7-L12
git push --force origin <tagname> HOWEVER After looking into this further it may not be possible to update these old tags without deleting the associated releases, see this StackOverflow comment:
Tags are also uniquely identified by names so there cannot be an annotated tag and lightweight tag with the same name:
So to update the tag a collaborator would need to:
I believe that even if you recreate a release with the same information the timestamp / creation of the release will not match the original release date which is also not desired behavior. Due to this it may not be possible to fix this for existing releases. I see some other options moving forward:
|
I think the past is under the bridge. Its another problem created by that cursed Git tool. What a fucking dumpster fire... Moving forward we will use annotated tags. That means we create the annotated one on the command line, and not use GitHub for tagging. I updated our procedures to specify annotated tags from the command line. See https://www.cryptopp.com/wiki/Release_Versioning#Tagging and https://www.cryptopp.com/wiki/Release_Process#Announce_the_release .
While not readily apparent, here's what changed. After Crypto++ 5.6.2 we migrated from Sourceforge to GitHub. So all the release tags from Crypto++ 2.0 to Crypto++ 5.6.2 got created by hand. At Crypto++ 5.6.3, we were on GitHub and used GitHub to create the tags. |
Crypto++ Issue Report
System Info
Actual Behavior
When crypto++ is embedded as a submodule in another repository, the command
git submodule status
shows the incorrect tag and version for the submodule:As seen above the latest version tag is listed as
v5.6.3
, but the commit69bf6b5
refers to the commit for thev8.6.0
release.Expected Behavior
When crypto++ is embedded as a submodule in another repository, the command
git submodule status
should show the latest version. If the commit is the same as a tagged release version it should only show the tag name.Root Cause
The command
git submodule status
usesgit describe
to determine the submodule status:The
git describe
command only shows annotated tags by default:After release
v5.6.3
the crypto++ project switched from annotated tags to lightweight tags:Thus when calling
git submodule status
the last annotated tag is returned which is forv5.6.3
. See [1] for full debugging log.Solution
The lightweight tags in this repository should be recreated as annotated tags.
Appendix
[1] Full debugging log
The text was updated successfully, but these errors were encountered: