Subject: Re: [PATCH v8 2/4] format-patch: add ability to use alt cover format

From: Mirko Faina <[email-masked]>
Date: Fri, 13 Mar 2026 20:17:01 +0100

On Fri, Mar 13, 2026 at 10:20:48AM -0700, Junio C Hamano wrote:
> I do not mind a sort of DWIM similar to "log --pretty=format:%s";
> technically, "git log --prefix" requires the "format:" prefix when
> using a custom format (i.e., not the canned "short", "fuller", etc.)
> but we DWIM when the string appears to use %-interpolation.

Then we can move towards keeping the "log:" prefix but
allowing for it to be dropped when %-interpolation occurs, just like
--pretty does.

Something to point out, --pretty does a very simple check (it seems to
check only for the presence of '%'). This does indeed catch typos
related to preset formats like "short", "full", etc... but it doesn't
catch typos in format-strings.
"an%" is an accepted format-string even without the prefix despite not
doing any substitution.

Maybe there should be a function, to be used as a check, that parses the
string and checks whether the format-string should be accepted.
This could be an improvement for a future patch.