]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7201-co.sh
mailinfo: factor out some repeated header handling
[thirdparty/git.git] / t / t7201-co.sh
index 324933acfe94153e166783e9810e98e69da1fc7e..b696bae5f534e82609f8dd0d27e6f9abb85cd7cc 100755 (executable)
@@ -160,7 +160,7 @@ test_expect_success 'checkout -m with merge conflict' '
        git diff master:one :3:uno |
        sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
        fill d2 aT d7 aS >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
        git diff --cached two >current &&
        test_must_be_empty current
 '
@@ -174,7 +174,7 @@ test_expect_success 'format of merge conflict from checkout -m' '
 
        git ls-files >current &&
        fill same two two two >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
 
        cat <<-EOF >expect &&
        <<<<<<< simple
@@ -223,13 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '
        test_must_fail git checkout simple 2>errs &&
        test_i18ngrep overwritten errs &&
 
-       git checkout --merge simple 2>errs &&
-       test_i18ngrep ! overwritten errs &&
-       git ls-files -u &&
-       test_must_fail git cat-file -t :0:two &&
-       test "$(git cat-file -t :1:two)" = blob &&
-       test "$(git cat-file -t :2:two)" = blob &&
-       test_must_fail git cat-file -t :3:two
+       test_must_fail git read-tree --quiet -m -u HEAD simple 2>errs &&
+       test_must_be_empty errs
 '
 
 test_expect_success 'checkout to detach HEAD (with advice declined)' '
@@ -254,9 +249,9 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
 test_expect_success 'checkout to detach HEAD' '
        git config advice.detachedHead true &&
        git checkout -f renamer && git clean -f &&
-       git checkout renamer^ 2>messages &&
-       test_i18ngrep "HEAD is now at 7329388" messages &&
-       (test_line_count -gt 1 messages || test -n "$GETTEXT_POISON") &&
+       GIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&
+       grep "HEAD is now at 7329388" messages &&
+       test_line_count -gt 1 messages &&
        H=$(git rev-parse --verify HEAD) &&
        M=$(git show-ref -s --verify refs/heads/master) &&
        test "z$H" = "z$M" &&