On Sun, Mar 10, 2019 at 11:42 PM Denton Liu <liu.denton@xxxxxxxxx> wrote: > This fixes a bug where the scissors line is placed after the Conflicts: > section, in the case where a merge conflict occurs and > commit.cleanup = scissors. > > Next, if commit.cleanup = scissors is specified, don't produce a > scissors line in commit if one already exists in the MERGE_MSG file. > > Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx> > --- > diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh > @@ -246,6 +246,52 @@ test_expect_success 'merge --squash c3 with c7' ' > +test_expect_success 'merge c3 with c7 with commit.cleanup = scissors' ' > + git config commit.cleanup scissors && > + git reset --hard c3 && > + test_must_fail git merge c7 && > + cat result.9z >file && > + git commit --no-edit -a && > + > + cat >expect <<-EOF && Use <<-\EOF here. > + Merge tag '"'"'c7'"'"' > + > + # ------------------------ >8 ------------------------ > + # Do not modify or remove the line above. > + # Everything below it will be ignored. > + # > + # Conflicts: > + # file > + EOF Style: here-doc body is normally indented to the same level as the command which starts the here-doc, so this body is indented too much. Same comments apply to other new test added by this patch. > + git cat-file commit HEAD >tmp && > + sed -e '1,/^$/d' <tmp >actual && > + test_i18ncmp expect actual > +'