Re: [PATCH v3 2/2] am: support --empty-commit option to handle empty patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux