Imported Upstream version 2.26.2
[platform/upstream/git.git] / t / t7102-reset.sh
index 86f23be..97be0d9 100755 (executable)
@@ -428,9 +428,9 @@ test_expect_success 'test --mixed <paths>' '
        git reset HEAD -- file1 file2 file3 &&
        test_must_fail git diff --quiet &&
        git diff > output &&
-       test_cmp output expect &&
+       test_cmp expect output &&
        git diff --cached > output &&
-       test_cmp output cached_expect
+       test_cmp cached_expect output
 '
 
 test_expect_success 'test resetting the index at give paths' '
@@ -549,8 +549,7 @@ test_expect_success 'reset -N keeps removed files as intent-to-add' '
 
        tree=$(git write-tree) &&
        git ls-tree $tree new-file >actual &&
-       >expect &&
-       test_cmp expect actual &&
+       test_must_be_empty actual &&
 
        git diff --name-only >actual &&
        echo new-file >expect &&
@@ -563,9 +562,8 @@ test_expect_success 'reset --mixed sets up work tree' '
                cd mixed_worktree &&
                test_commit dummy
        ) &&
-       : >expect &&
        git --git-dir=mixed_worktree/.git --work-tree=mixed_worktree reset >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_done