summaryrefslogtreecommitdiff
path: root/t/t7011-skip-worktree-reading.sh
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2021-04-08 17:41:28 -0300
committerJunio C Hamano <gitster@pobox.com>2021-04-08 14:18:03 -0700
commitd5f4b8260f623d6fdef36d5eaa8a0c2350390472 (patch)
tree60de9c3ff1ee4936bbb0e8eb231731ea52de4c29 /t/t7011-skip-worktree-reading.sh
parenta20f70478ffcc66d30936920ebcc35ebfc12a7c7 (diff)
downloadgit-d5f4b8260f623d6fdef36d5eaa8a0c2350390472.tar.gz
rm: honor sparse checkout patterns
`git add` refrains from adding or updating index entries that are outside the current sparse checkout, but `git rm` doesn't follow the same restriction. This is somewhat counter-intuitive and inconsistent. So make `rm` honor the sparsity rules and advise on how to remove SKIP_WORKTREE entries just like `add` does. Also add some tests for the new behavior. Suggested-by: Elijah Newren <newren@gmail.com> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7011-skip-worktree-reading.sh')
-rwxr-xr-xt/t7011-skip-worktree-reading.sh5
1 files changed, 0 insertions, 5 deletions
diff --git a/t/t7011-skip-worktree-reading.sh b/t/t7011-skip-worktree-reading.sh
index 26852586ac..1761a2b1b9 100755
--- a/t/t7011-skip-worktree-reading.sh
+++ b/t/t7011-skip-worktree-reading.sh
@@ -132,11 +132,6 @@ test_expect_success 'diff-files does not examine skip-worktree dirty entries' '
test -z "$(git diff-files -- one)"
'
-test_expect_success 'git-rm succeeds on skip-worktree absent entries' '
- setup_absent &&
- git rm 1
-'
-
test_expect_success 'commit on skip-worktree absent entries' '
git reset &&
setup_absent &&