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

Re: [PATCH] format-patch: output header for empty commits

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2023, 20:43 UTC
Message-ID
<xmqqo7p3rn26.fsf@gitster.g>
In-Reply-To
<ZAjxL2MIXCNZgYj/@keeping.me.uk>
John Keeping <john@keeping.me.uk> writes:
Show 8 quoted lines
>> Overall, if we were designing format-patch/send-email/am today with
>> today's use cases in mind without any existing users of these three
>> commands, I think these three would be designed to pass an empty
>> commit through the chain unconditionally.  But we do not live in
>> such a world, so perhaps some sort of opting in may be appropriate.
>
> Does that mean you want to see format-patch die on empty commits unless
> --allow-empty is specified?

No, what I (with Devil's advocate hat on) suggested was to hide the "instead of leaving an empty file, fill the file with the log message" feature this patch adds behind --allow-empty option, and when the option is not given, keep the current behaviour.

Previous: John Keeping
Message 6 of 6 in “format-patch: output header for empty commits”
  1. format-patch: output header for empty commitsJohn Keeping, Mar 3, 2023
  2. Junio C HamanoMar 3, 2023
  3. John KeepingMar 4, 2023
  4. Junio C HamanoMar 6, 2023
  5. John KeepingMar 8, 2023
  6. Junio C HamanoMar 8, 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.