Subject: Re: [RFC PATCH] format-patch: better commit list for cover letter

From: Mirko Faina <[email-masked]>
Date: Sat, 21 Feb 2026 16:59:06 +0100

On Fri, Feb 20, 2026 at 10:02:21PM -0800, Junio C Hamano wrote:
>
> Just off the top of my head...
>
> Perhaps with
>
>     [format]
> 	commitListFormat ;# true
>
> we use
>
> 	[1/1] format-patch: better commit list for cover letter
>
> and with
>
>     [format]
> 	commitListFormat="%s (%an)"
>
> we use
>
> 	[1/1] format-patch: better commit list for cover letter	(Mirko Faina)
>
> instead.  IOW, the value of the configuration variable is used as
> the format argument "log --format=...", and appended to the fixed
> [n/m] that gives the numbers.
>
> Without format.commitListFormat defined, or when it is defined to
> false, we'd use the traditional "shortlog" format.
>
> Hmm?

Yes, sounds good.

> And the corresponding command line option can look like
> 
> 	--cover-letter=(shortlog | log:<log format spec>)
> 
> e.g.,
> 
> 	--cover-letter=log:"%s (%an)"
> 
> to override configured value per invocation basis.

Not too sure about this one. The point was to have a useful default for
the cover letter template. If users have to pass a format spec through
the command line it kinda defeates the purpose.

Since we're close to having Git 3.0, maybe the change in default
behaviour can be scheduled for 3.0?