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

From: Junio C Hamano <[email-masked]>
Date: Sun, 04 Jan 2026 11:27:01 +0900

Dominique Martinet <[email-masked]> 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".