Re: [PATCH v3 2/2] am: support --empty-commit option to handle empty patches
flat view
From: Aleen 徐沛文 <hidden>
Date: 2021-11-15 11:14:52
Dears Hamano, Sorry about the late submission, and I have modified it to support the `--empty-commit=(die|skip|asis)` pattern.
quoted hunk ↗ jump to hunk
+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