From: Aleen 徐沛文 Date: Mon, 15 Nov 2021 11:13:47 GMT Subject: Re: [PATCH v3 2/2] am: support --empty-commit option to handle empty patches Message-ID: <60d0c28e.2943.17d234d975d.Coremail.pwxu@coremail.cn> In-Reply-To: Dears Hamano, Sorry about the late submission, and I have modified it to support the `--empty-commit=(die|skip|asis)` pattern. > +test_expect_success 'record as an empty commit when meeting e-mail message that lacks a patch' ' > + git am --empty-commit=asis empty-commit.patch && > + test_path_is_missing .git/rebase-apply && > + git show empty-commit --format="%B" >expected && > + git show HEAD --format="%B" >actual && > + grep -f actual expected && > + > + git am --empty-commit=asis cover-letter.patch && > + test_path_is_missing .git/rebase-apply && > + git show empty-commit --format="%B" >expected && > + git show HEAD --format="%B" >actual && > + grep -f actual expected > +' When it comes to the last test case, there are some accidental contents recognized as commit messages inside an empty patch, like: 1. version signatures: > -- > 2.34.0.rc2.390.gef33ce8c6f 2. information of cover letter: > *** BLURB HERE *** > > A U Thor (1): > empty commit I don't think it is necessary to fix it within `mailinfo.c`. Can you give me some suggestions on whether this case should be handled? Aleen