]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3700-add.sh
Merge branch 'md/list-lazy-objects-fix'
[thirdparty/git.git] / t / t3700-add.sh
index 07af05d7aee65c51245431292a21ec38eef19f53..37729ba2582119047d559d22df8c522f9c0ab0f1 100755 (executable)
@@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'
 test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
        git rm --cached -f file symlink &&
        (
-               echo "100644 $(git hash-object -w stage1) 1     file"
-               echo "100755 $(git hash-object -w stage2) 2     file"
-               echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink"
+               echo "100644 $(git hash-object -w stage1) 1     file" &&
+               echo "100755 $(git hash-object -w stage2) 2     file" &&
+               echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink" &&
                echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
        ) | git update-index --index-info &&
        git config core.filemode 0 &&
@@ -188,9 +188,8 @@ test_expect_success 'git add --refresh with pathspec' '
        git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo &&
        echo "100644 $H 3       foo" | git update-index --index-info &&
        test-tool chmtime -60 bar baz &&
-       >expect &&
        git add --refresh bar >actual &&
-       test_cmp expect actual &&
+       test_must_be_empty actual &&
 
        git diff-files --name-only >actual &&
        ! grep bar actual&&
@@ -265,7 +264,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
        git reset --hard &&
        H=$(git rev-parse :1/2/a) &&
        (
-               echo "100644 $H 1       track-this"
+               echo "100644 $H 1       track-this" &&
                echo "100644 $H 3       track-this"
        ) | git update-index --index-info &&
        echo track-this >>.gitignore &&