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

Re: [RFC PATCH] builtin/format-patch: print a warning for skipped merge commits?

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2026, 02:27 UTC
Message-ID
<xmqqy0mep0y2.fsf@gitster.g>
In-Reply-To
<aVkKmcER2K8D9U4T@codewreck.org>
Dominique Martinet <asmadeus@codewreck.org> writes:
> Okay, I can see this being confusing to people not used to format-patch
> even with a range, but I agree it'll be annoying more often than not in
> general so I'm fine with this.
Yup, nobody stays to be newbie forever ;-).
> It makes it a bit cumbersome to print details about the commit(s) being
> skipped though, so it's probably simpler to do a generic message like
> "No patch generated. Note merge commits are skipped." like this?

Or queue these merge commits in another commit list instead of a single boolean "seen_merge". The warning is issued only on the error path, so as long as accumulation phase is cheap enough to record information necessary to later create detailed messages, the location you added a single warning() call can call a new helper function that gives more details like commit log messages, etc., if we wanted to. Or seen_merge can become a counter and the warning message can become a simpler "skipped %d merges".

Previous: Dominique MartinetNext: Dominique Martinet
Message 5 of 6 in “builtin/format-patch: print a warning for skipped merge commits?”
  1. builtin/format-patch: print a warning for skipped merge commits?Dominique Martinet, Dec 31, 2025
  2. Junio C HamanoDec 31, 2025
  3. Jeff KingJan 2, 2026
  4. Dominique MartinetJan 3, 2026
  5. Junio C HamanoJan 4, 2026
  6. Dominique MartinetFeb 1, 2026

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.