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

From: Junio C Hamano <[email-masked]>
Date: Fri, 20 Feb 2026 22:02:21 -0800

Junio C Hamano <[email-masked]> writes:

>> Maybe the "--cover-letter" option can take an argument like
>> "--cover-letter=<shortlog | commitlist>". ...
>
> 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?

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.