Skip to content

Commit c5978a5

Browse files
moygitster
authored andcommitted
t7609-merge-co-error-msgs: test non-fast forward case too.
Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5e65ee3 commit c5978a5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

t/t7609-merge-co-error-msgs.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@ error: The following untracked working tree files would be overwritten by merge:
3434
Please move or remove them before you can merge.
3535
EOF
3636

37-
test_expect_success 'untracked files overwritten by merge' '
37+
test_expect_success 'untracked files overwritten by merge (fast and non-fast forward)' '
3838
test_must_fail git merge branch 2>out &&
39-
test_cmp out expect
39+
test_cmp out expect &&
40+
git commit --allow-empty -m empty &&
41+
(
42+
GIT_MERGE_VERBOSITY=0 &&
43+
export GIT_MERGE_VERBOSITY &&
44+
test_must_fail git merge branch 2>out2
45+
) &&
46+
test_cmp out2 expect &&
47+
git reset --hard HEAD^
4048
'
4149

4250
cat >expect <<\EOF

0 commit comments

Comments
 (0)