Re: [PATCH v8 2/4] format-patch: add ability to use alt cover format
- From
Mirko Faina <mroik@delayed.space>
- Date
- Mar 13, 2026, 19:17 UTC
- Message-ID
- <abRTEXspvX_z0usP@exploit>
- In-Reply-To
- <xmqqqzpn63yn.fsf@gitster.g>
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.