git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/3] doc: tag: document `TAG_EDITMSG`

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
May 16, 2023, 17:55 UTC
Message-ID
<882008e32a482d4b05d522430abf3419476f2302.1684258780.git.code@khaugsbakk.name>
In-Reply-To
<cover.1684258780.git.code@khaugsbakk.name>

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>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    § From v2
    
    • 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 in: https://lore.kernel.org/git/xmqqy1lqaxln.fsf@gitster.g/T/#u
 Documentation/git-tag.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index fdc72b5875a..46e56b02455 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
 -----
 
-- 
2.40.1
Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 17 of 26 in “tag: keep the message file in case ref transaction fails”
  1. 0/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 14, 2023
  2. 1/3 t/t7004-tag: add regression test for existing behaviorKristoffer Haugsbakk, May 14, 2023
  3. Junio C HamanoMay 15, 2023
  4. 2/3 t/t7004-tag: add failing tag message file testKristoffer Haugsbakk, May 14, 2023
  5. Junio C HamanoMay 15, 2023
  6. Junio C HamanoMay 15, 2023
  7. Kristoffer HaugsbakkMay 15, 2023
  8. 3/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 14, 2023
  9. Junio C HamanoMay 15, 2023
  10. 0/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 15, 2023
  11. 1/3 doc: tag: document `TAG_EDITMSG`Kristoffer Haugsbakk, May 15, 2023
  12. Junio C HamanoMay 15, 2023
  13. 2/3 t/t7004-tag: add regression test for successful tag creationKristoffer Haugsbakk, May 15, 2023
  14. 3/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 15, 2023
  15. Junio C HamanoMay 15, 2023
  16. 0/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 16, 2023
  17. 1/3 doc: tag: document `TAG_EDITMSG`Kristoffer Haugsbakk, May 16, 2023
  18. 2/3 t/t7004-tag: add regression test for successful tag creationKristoffer Haugsbakk, May 16, 2023
  19. 3/3 tag: keep the message file in case ref transaction failsKristoffer Haugsbakk, May 16, 2023
  20. Junio C HamanoMay 16, 2023
  21. Jeff KingMay 17, 2023
  22. Junio C HamanoMay 17, 2023
  23. Jeff KingMay 17, 2023
  24. Eric SunshineMay 17, 2023
  25. Kristoffer HaugsbakkMay 17, 2023
  26. Kristoffer HaugsbakkMay 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.