pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref()
[gitweb.git] / t / t2202-add-addremove.sh
index 6a8151064c8256bd03a90460eb1bd6970428f2f0..6a5a3166b1823e751dfe19a28bf54c147dd798b3 100755 (executable)
@@ -14,6 +14,7 @@ test_expect_success setup '
                echo expect
                echo ignored
        ) >.gitignore &&
+       git --literal-pathspecs add --all &&
        >will-remove &&
        git add --all &&
        test_tick &&
@@ -41,4 +42,14 @@ test_expect_success 'git add --all' '
        test_cmp expect actual
 '
 
+test_expect_success 'Just "git add" is a no-op' '
+       git reset --hard &&
+       echo >will-remove &&
+       >will-not-be-added &&
+       git add &&
+       git diff-index --name-status --cached HEAD >actual &&
+       >expect &&
+       test_cmp expect actual
+'
+
 test_done