Re: [PATCH v6 3/5] format-patch: add ability to use alt cover format
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 10, 2026, 22:14 UTC
- Message-ID
- <xmqqldfzs567.fsf@gitster.g>
- In-Reply-To
- <316c9e76ee49d73aff75b63299c970e9f55f79b6.1772837832.git.mroik@delayed.space>
Mirko Faina <mroik@delayed.space> writes:
Show 8 quoted lines
> +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?
Show 22 quoted lines
> 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.