git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jacob Stopak <jacob@initialcommit.io>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] bugreport: add 'seconds' to default outfile name
Date: Sat, 14 Oct 2023 09:27:27 -0700	[thread overview]
Message-ID: <xmqq4jitw4nk.fsf@gitster.g> (raw)
In-Reply-To: <20231014040101.8333-1-jacob@initialcommit.io> (Jacob Stopak's message of "Fri, 13 Oct 2023 21:01:01 -0700")

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.

  parent reply	other threads:[~2023-10-14 16:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-14  4:01 [PATCH] bugreport: add 'seconds' to default outfile name Jacob Stopak
2023-10-14 10:35 ` Kristoffer Haugsbakk
2023-10-14 16:27 ` Junio C Hamano [this message]
2023-10-14 16:33   ` Dragan Simic
2023-10-14 17:45     ` Junio C Hamano
2023-10-14 17:52       ` Dragan Simic
2023-10-15  3:07         ` Jacob Stopak
2023-10-15  3:13           ` Dragan Simic
2023-10-15  3:01   ` Jacob Stopak
2023-10-15 17:06     ` Junio C Hamano
2023-10-15  3:42 ` [PATCH v2 0/3] bugreport: include +i in outfile suffix as needed Jacob Stopak
2023-10-15  3:42   ` [PATCH v2 1/3] " Jacob Stopak
2023-10-15 17:36     ` Junio C Hamano
2023-10-16 21:40     ` [PATCH v3 0/1] " Jacob Stopak
2023-10-16 21:40       ` [PATCH v3 1/1] " Jacob Stopak
2023-10-16 22:55         ` Junio C Hamano
2023-10-17  3:17           ` Jacob Stopak
2023-10-21  0:39         ` Junio C Hamano
2023-10-26 21:19         ` Emily Shaffer
2023-10-27  6:34           ` Jacob Stopak
2024-01-06  4:54             ` Jacob Stopak
2023-10-15  3:42   ` [PATCH v2 2/3] bugreport: match diagnostics filename with report Jacob Stopak
2023-10-15  3:42   ` [PATCH v2 3/3] bugreport: don't create --diagnose zip w/o report Jacob Stopak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4jitw4nk.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jacob@initialcommit.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).