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

Re: [PATCH] bugreport: add 'seconds' to default outfile name

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 14, 2023, 16:27 UTC
Message-ID
<xmqq4jitw4nk.fsf@gitster.g>
In-Reply-To
<20231014040101.8333-1-jacob@initialcommit.io>
Jacob Stopak <jacob@initialcommit.io> writes:
> Currently, git bugreport postfixes the default bugreport filename (and
> diagnostics zip filename if --diagnose is supplied) with the current
> calendar hour and minute values, assuming the -s flag is absent.

Is "postfix" a verb that is commonly understood? I would say "append" would be understood by more readers. Also, is "calendar" hour different from other kinds of hours, perhaps stopwatch hours and microwave-oven hours?

> If a user runs the bugreport command more than once within a calendar
> minute, a filename conflict with an existing file occurs and the program
> errors, since the new output filename was already used for the previous
> file.
This is totally expected and you made an excellent observation.

I personally do not think it is a problem, simply because a quality bug report that would capture information necessary to diagnose any issue concisely in a readable fashion would take at least 90 seconds or more to produce, though.

Instead of lengthening the filename for all files by 2 digits, the command can retry by adding say "+1", "+2", etc. after the failed filename to find a unique suffix within the same minute. It would mean that after writing git-bugreport-2023-10-14-0920.txt and you start another one without spending enough time, the new one may become git-bugreport-2023-10-14-0920+1.txt or something unique. It would be really unlikely that you would run out after failing to find a vacant single digit suffix nine times, i.e. trying "+9". It would also help preserve existing user's workflow, e.g. they may have written automation that assumes the down-to-minute format and it would keep working on their bug reports without breaking.

Previous: Kristoffer HaugsbakkNext: Dragan Simic
Message 3 of 23 in “bugreport: add 'seconds' to default outfile name”
  1. bugreport: add 'seconds' to default outfile nameJacob Stopak, Oct 14, 2023
  2. Kristoffer HaugsbakkOct 14, 2023
  3. Junio C HamanoOct 14, 2023
  4. Dragan SimicOct 14, 2023
  5. Junio C HamanoOct 14, 2023
  6. Dragan SimicOct 14, 2023
  7. Jacob StopakOct 15, 2023
  8. Dragan SimicOct 15, 2023
  9. Jacob StopakOct 15, 2023
  10. Junio C HamanoOct 15, 2023
  11. 0/3 bugreport: include +i in outfile suffix as neededJacob Stopak, Oct 15, 2023
  12. 1/3 bugreport: include +i in outfile suffix as neededJacob Stopak, Oct 15, 2023
  13. Junio C HamanoOct 15, 2023
  14. 0/1 bugreport: include +i in outfile suffix as neededJacob Stopak, Oct 16, 2023
  15. 1/1 bugreport: include +i in outfile suffix as neededJacob Stopak, Oct 16, 2023
  16. Junio C HamanoOct 16, 2023
  17. Jacob StopakOct 17, 2023
  18. Junio C HamanoOct 21, 2023
  19. Emily ShafferOct 26, 2023
  20. Jacob StopakOct 27, 2023
  21. Jacob StopakJan 6, 2024
  22. 2/3 bugreport: match diagnostics filename with reportJacob Stopak, Oct 15, 2023
  23. 3/3 bugreport: don't create --diagnose zip w/o reportJacob Stopak, Oct 15, 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.