Re: git tag: don't complain of empty messages
- From
Han-Wen Nienhuys <hanwen@xs4all.nl>
- Date
- Nov 15, 2006, 16:05 UTC
- Message-ID
- <455B3AC2.10107@xs4all.nl>
- In-Reply-To
- <Pine.LNX.4.63.0611151657570.13772@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin escreveu:
Show 12 quoted lines
> Hi, > > On Wed, 15 Nov 2006, Han-Wen Nienhuys wrote: > >> GIT refuses to set annotated tags without a comment. I think this is a silly >> restriction when the message is explicitly set to the empty string. > > I think that this behaviour is on purpose: The tag will be identified > (like all objects in git) by its contents. The rationale: the filename > does not matter, since the tag _object_ is not identified by it. So, in > case you lose your .git/refs/tags/ directory, you can still reconstruct > the tags with "git-fsck-objects --full".
Without a message, the tag can still be identified by its name, which is in the tag object contents.