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

Re: [PATCH] format-patch: add --mboxrd alias for --pretty=mboxrd

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 18, 2022, 04:24 UTC
Message-ID
<xmqqv8m9wd7r.fsf@gitster.g>
In-Reply-To
<20221114205909.GA14736@dcvr>
Eric Wong <e@80x24.org> writes:
> As I noted in the commit message, I think discussing --pretty=*
> in the context of format-patch would be confusing for users.
Sensible.
Show 10 quoted lines
>> > +	if (mboxrd)
>> > +		rev.commit_format = CMIT_FMT_MBOXRD;
>> > +
>
> It could be something like this:
>
> 	if (rev.commit_format == CMIT_FMT_MBOXRD && !use_stdout)
> 		warning("mboxrd without --stdout makes no sense\n");
>
> But I'm on the fence about the warning.

Does it really hurt when generating individual files, or does it naturally degenerate to the same as the plain old mbox, or something? If it does not hurt, then let's not clutter the output with a message that may make the user worried unnecessarily.

Having said all that, if --pretty=mboxrd is usable, do we really need the --mboxrd short-hand? If we plan to eventually switch the default output format to mboxrd (which I am assuming your longer term vision), wouldn't it be the traditional format that may need a short-hand when something goes wrong?

This change does not seem to be something we cannot live without, and as a step in the direction to move all of us to mboxrd, this feels somewhat a roundabout step. I wonder if it would be more direct to

 - declare that we will eventually switch to use mboxrd by default;
 - give a configuration knob to retain the current email as default;
 - do the usual deprecation dance.

After all, between email and mboxrd, the e-mailed patch format is not something we choose per-invocation basis, is it?

Picking a suitable format per project and setting it in .git/config, or picking a suitble format for yourself and setting it in ~/.gitconfig, and not having to think about it afterwards may be a better use of our users' time.

Thanks.
Previous: Eric WongNext: Eric Wong
Message 4 of 6 in “format-patch: add --mboxrd alias for --pretty=mboxrd”
  1. format-patch: add --mboxrd alias for --pretty=mboxrdEric Wong, Nov 14, 2022
  2. Ævar Arnfjörð BjarmasonNov 14, 2022
  3. Eric WongNov 14, 2022
  4. Junio C HamanoDec 18, 2022
  5. format-patch: support format.mboxrd with --stdoutEric Wong, Dec 22, 2022
  6. Junio C HamanoDec 23, 2022

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.