Message ID | 0e0e592853d272a28fb04c5183784339d7377547.1684181855.git.code@khaugsbakk.name (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | tag: keep the message file in case ref transaction fails | expand |
Kristoffer Haugsbakk <code@khaugsbakk.name> writes: > Document `TAG_EDITMSG` which we have told the user about on unsuccessful > command invocations since commit 3927bbe9a4 (tag: delete TAG_EDITMSG > only on successful tag, 2008-12-06). > > Introduce this documentation since we are going to add tests for the > lifetime of this file in the case of command failure and success. > > Use the documentation for `COMMIT_EDITMSG` from `git-commit.txt` as a > template since these two files share the same purpose.[1] > > † 1: from commit 3927bbe9a4: > > “ This matches the behavior of COMMIT_EDITMSG, which stays around > in case of error. > > Suggested-by: Junio C Hamano <gitster@pobox.com> > Cc: Jeff King <peff@peff.net> > Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> > --- Excellent.
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index fdc72b5875..46e56b0245 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -377,6 +377,16 @@ $ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1 include::date-formats.txt[] +FILES +----- + +`$GIT_DIR/TAG_EDITMSG`:: + This file contains the message of an in-progress annotated + tag. If `git tag` exits due to an error before creating an + annotated tag then the tag message that has been provided by the + user in an editor session will be available in this file, but + may be overwritten by the next invocation of `git tag`. + NOTES -----
Document `TAG_EDITMSG` which we have told the user about on unsuccessful command invocations since commit 3927bbe9a4 (tag: delete TAG_EDITMSG only on successful tag, 2008-12-06). Introduce this documentation since we are going to add tests for the lifetime of this file in the case of command failure and success. Use the documentation for `COMMIT_EDITMSG` from `git-commit.txt` as a template since these two files share the same purpose.[1] † 1: from commit 3927bbe9a4: “ This matches the behavior of COMMIT_EDITMSG, which stays around in case of error. Suggested-by: Junio C Hamano <gitster@pobox.com> Cc: Jeff King <peff@peff.net> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> --- Notes (series): • I changed (from `COMMIT_EDITMSG`) “will be overwritten” to “may” since I don’t see the point in giving a guarantee • Unsure if I was going to put this before or after “NOTES” as there seems to be no precedence Suggested by Junio: https://lore.kernel.org/git/xmqqy1lqaxln.fsf@gitster.g/T/#u Documentation/git-tag.txt | 10 ++++++++++ 1 file changed, 10 insertions(+)