Subject: Re: [PATCH v6 3/5] format-patch: add ability to use alt cover format

From: Junio C Hamano <[email-masked]>
Date: Tue, 10 Mar 2026 15:14:40 -0700

Mirko Faina <[email-masked]> writes:

> +static void generate_commit_list_cover(FILE *cover_file, const char *format,
> +				       struct commit **list, int n)
> +{
> +	struct strbuf commit_line = STRBUF_INIT;
> +	struct pretty_print_context ctx = {0};
> +	struct rev_info rev = REV_INFO_INIT;
> +
> +	strbuf_init(&commit_line, 0);

We don't need this, when the struct is already initialized at the
definition a few lines above, do we?

> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index 21d6d0cd9e..458da80721 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -380,6 +380,54 @@ test_expect_success 'filename limit applies only to basename' '
>  	done
>  '
>  
> +test_expect_success 'cover letter with subject, author and count' '
> +	rm -rf patches &&
> +	test_when_finished "git reset --hard HEAD~1" &&
> +	test_when_finished "rm -rf patches result test_file" &&
> +	touch test_file &&
> +	git add test_file &&
> +	git commit -m "This is a subject" &&
> +	git format-patch --cover-letter \
> +	--cover-letter-format="log:[%(count)/%(total)] %s (%an)" -o patches HEAD~1 &&
> +	grep "^\[1/1\] This is a subject (A U Thor)$" patches/0000-cover-letter.patch >result &&
> +	test_line_count = 1 result
> +'
> +
> +test_expected_success 'cover letter with author and count' '

Has this test been run successfully?  It is unsual that only one
among several you are adding has this typo.