Subject: Re: [PATCH v2 1/2] commit: Avoid redundant scissor line with --cleanup=scissors -v

From: Josh Triplett <[email-masked]>
Date: Wed, 28 Feb 2024 22:09:58 -0800

On Wed, Feb 28, 2024 at 09:41:22PM -0800, Junio C Hamano wrote:
> Josh Triplett <[email-masked]> writes:
> > If you do end up needing a resend of any of them, I'm happy to do so.
>
> I do not think there is need for resending, but I think you promised
> to add some tests earlier, so an updated patch may be in order ;-)

I did add a test; v2 that you replied to has this:
> Add a test for this.
[...]
>  t/t7502-commit-porcelain.sh |  5 +++++
[...]
> diff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh
> index a87c211d0b..b37e2018a7 100755
> --- a/t/t7502-commit-porcelain.sh
> +++ b/t/t7502-commit-porcelain.sh
> @@ -736,6 +736,11 @@ test_expect_success 'message shows date when it is explicitly set' '
>         .git/COMMIT_EDITMSG
>  '
>  
> +test_expect_success 'message does not have multiple scissors lines' '
> +     git commit --cleanup=scissors -v --allow-empty -e -m foo &&
> +     test $(grep -c -e "--- >8 ---" .git/COMMIT_EDITMSG) -eq 1
> +'
> +
>  test_expect_success AUTOIDENT 'message shows committer when it is automatic' '
>  
>       echo >>negative &&

https://lore.kernel.org/git/[email-masked]/T/#Z2e.:..:4f97933f173220544a5be2bf05c2bee2b044d2b1.1709024540.git.josh::40joshtriplett.org:1t:t7502-commit-porcelain.sh