diff options
author | Matheus Tavares <matheus.bernardino@usp.br> | 2021-04-08 17:41:23 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-08 14:18:03 -0700 |
commit | 6594afc3cc4bd87247b44d3d3bf75d693fc066aa (patch) | |
tree | 62e7ba3bb795a446d4dec04ac100f0337ca7b578 /t/t7012-skip-worktree-writing.sh | |
parent | add: include magic part of pathspec on --refresh error (diff) | |
download | tgif-6594afc3cc4bd87247b44d3d3bf75d693fc066aa.tar.xz |
t3705: add tests for `git add` in sparse checkouts
We already have a couple tests for `add` with SKIP_WORKTREE entries in
t7012, but these only cover the most basic scenarios. As we will be
changing how `add` deals with sparse paths in the subsequent commits,
let's move these two tests to their own file and add more test cases
for different `add` options and situations. This also demonstrates two
options that don't currently respect SKIP_WORKTREE entries: `--chmod`
and `--renormalize`.
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7012-skip-worktree-writing.sh')
-rwxr-xr-x | t/t7012-skip-worktree-writing.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/t/t7012-skip-worktree-writing.sh b/t/t7012-skip-worktree-writing.sh index f2a8e76511..a1080b94e3 100755 --- a/t/t7012-skip-worktree-writing.sh +++ b/t/t7012-skip-worktree-writing.sh @@ -60,13 +60,6 @@ setup_absent() { git update-index --skip-worktree 1 } -test_absent() { - echo "100644 $EMPTY_BLOB 0 1" > expected && - git ls-files --stage 1 > result && - test_cmp expected result && - test ! -f 1 -} - setup_dirty() { git update-index --force-remove 1 && echo dirty > 1 && @@ -100,18 +93,6 @@ test_expect_success 'index setup' ' test_cmp expected result ' -test_expect_success 'git-add ignores worktree content' ' - setup_absent && - git add 1 && - test_absent -' - -test_expect_success 'git-add ignores worktree content' ' - setup_dirty && - git add 1 && - test_dirty -' - test_expect_success 'git-rm fails if worktree is dirty' ' setup_dirty && test_must_fail git rm 1 && |