X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7600-merge.sh;h=fee8fb77d48ef7d4fa08e77f879718d7ab5b1bc0;hb=d6096f17d2d5d9ccb453aabf8edc6ee238b166fc;hp=d4cf6289a4c06ec9436235b7325379f26a388e06;hpb=711f6b295cf463aae07eb76e009faed3d3699623;p=git.git diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index d4cf6289a..fee8fb77d 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -126,7 +126,7 @@ verify_merge() { echo "[OOPS] unmerged files" false fi && - if ! git diff --exit-code + if test_must_fail git diff --exit-code then echo "[OOPS] working tree != index" false @@ -222,36 +222,12 @@ test_expect_success 'setup' ' test_debug 'gitk --all' test_expect_success 'test option parsing' ' - if git merge -$ c1 - then - echo "[OOPS] -$ accepted" - false - fi && - if git merge --no-such c1 - then - echo "[OOPS] --no-such accepted" - false - fi && - if git merge -s foobar c1 - then - echo "[OOPS] -s foobar accepted" - false - fi && - if git merge -s=foobar c1 - then - echo "[OOPS] -s=foobar accepted" - false - fi && - if git merge -m - then - echo "[OOPS] missing commit msg accepted" - false - fi && - if git merge - then - echo "[OOPS] missing commit references accepted" - false - fi + test_must_fail git merge -$ c1 && + test_must_fail git merge --no-such c1 && + test_must_fail git merge -s foobar c1 && + test_must_fail git merge -s=foobar c1 && + test_must_fail git merge -m && + test_must_fail git merge ' test_expect_success 'merge c0 with c1' ' @@ -512,4 +488,14 @@ test_expect_success 'merge c1 with c1 and c2' ' test_debug 'gitk --all' +test_expect_success 'merge fast-forward in a dirty tree' ' + git reset --hard c0 && + mv file file1 && + cat file1 >file && + rm -f file1 && + git merge c2 +' + +test_debug 'gitk --all' + test_done