Re: [PATCH v3 1/1] bugreport: include +i in outfile suffix as needed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 21, 2023, 00:39 UTC
- Message-ID
- <xmqqo7gsolka.fsf@gitster.g>
- In-Reply-To
- <20231016214045.146862-2-jacob@initialcommit.io>
Jacob Stopak <jacob@initialcommit.io> writes:
Show 17 quoted lines
> int cmd_bugreport(int argc, const char **argv, const char *prefix)
> {
> struct strbuf buffer = STRBUF_INIT;
> struct strbuf report_path = STRBUF_INIT;
> int report = -1;
> time_t now = time(NULL);
> - struct tm tm;
> enum diagnose_mode diagnose = DIAGNOSE_NONE;
> char *option_output = NULL;
> - char *option_suffix = "%Y-%m-%d-%H%M";
> + char *option_suffix = "";
> + int option_suffix_is_from_user = 0;
> const char *user_relative_path = NULL;
> char *prefixed_filename;
> - size_t output_path_len;
> int ret;
> + int i = 0;OK, I think between me and you, we stared at this piece of code long enough to make ourselves numb. The original "at most one report per a minute" default came from the very original in 238b439d (bugreport: add tool to generate debugging info, 2020-04-16) and that is what we are changing, so let me summon its author as an area expert for a pair of fresh eyes to see if they can offer any new insights.
Thanks.
https://lore.kernel.org/git/20231016214045.146862-1-jacob@initialcommit.io/