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

Re: [PATCH 0/3] tag: keep the message file in case ref transaction fails

From
Jeff King <peff@peff.net>
Date
May 17, 2023, 17:37 UTC
Message-ID
<20230517173709.GA535409@coredump.intra.peff.net>
In-Reply-To
<xmqqo7mjq779.fsf@gitster.g>
On Wed, May 17, 2023 at 09:00:10AM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> > I dunno. There is a certain elegance to telling the user about what
> > progress we _did_ make, but if there isn't an easy way to turn that into
> > a retry of their command, it may not be all that useful.
> 
> Yeah, I am OK with "leaving TAG_EDITMSG behind" and a future "tag
> -c/-C $another" to coexist.
Me too.
One thing I wondered is whether the obvious command to retry:
  git tag -F .git/TAG_EDITMSG foo

would work, or if we would overwrite the file before it is read. But it does work, which is good. I wonder if we:

  a. want to protect that with a test (since I could imagine a
     refactoring where we try to copy the "-F" contents from file to
     file, rather than reading it into a memory buffer ahead of time)
  b. want to tell users that is a good way to recover (though maybe that
     is a rabbit hole of details as one subtlety is that it will be
     overwritten by an unrelated tag command).

But I am also happy to leave it to the user's imagination to pull the contents from the file with "cp" or their editor. :)

-Peff
Previous: Junio C HamanoNext: Eric Sunshine
Message 23 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.