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".