summaryrefslogtreecommitdiff
path: root/t/t1092-sparse-checkout-compatibility.sh
diff options
context:
space:
mode:
authorLibravatar Lessley Dennington <lessleydennington@gmail.com>2021-12-06 15:55:59 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-06 09:55:06 -0800
commit338e2a9acc801ed4c5153b926579e7bea55a0be9 (patch)
tree47f6edc0fa226a8e81b2a2b0426f712dfb2745d2 /t/t1092-sparse-checkout-compatibility.sh
parentrepo-settings: prepare_repo_settings only in git repos (diff)
downloadtgif-338e2a9acc801ed4c5153b926579e7bea55a0be9.tar.xz
diff: replace --staged with --cached in t1092 tests
Replace uses of the synonym --staged in t1092 tests with --cached (which is the real and preferred option). This will allow consistency in the new tests to be added with the upcoming change to enable the sparse index for diff. Signed-off-by: Lessley Dennington <lessleydennington@gmail.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1092-sparse-checkout-compatibility.sh')
-rwxr-xr-xt/t1092-sparse-checkout-compatibility.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index 569d63c2b3..fea9942b90 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -401,7 +401,7 @@ test_expect_success 'checkout and reset --hard' '
test_all_match git reset --hard update-folder2
'
-test_expect_success 'diff --staged' '
+test_expect_success 'diff --cached' '
init_repos &&
write_script edit-contents <<-\EOF &&
@@ -410,10 +410,10 @@ test_expect_success 'diff --staged' '
run_on_all ../edit-contents &&
test_all_match git diff &&
- test_all_match git diff --staged &&
+ test_all_match git diff --cached &&
test_all_match git add README.md &&
test_all_match git diff &&
- test_all_match git diff --staged
+ test_all_match git diff --cached
'
# NEEDSWORK: sparse-checkout behaves differently from full-checkout when
@@ -430,8 +430,8 @@ test_expect_success 'diff with renames and conflicts' '
test_all_match git checkout rename-base &&
test_all_match git checkout $branch -- . &&
test_all_match git status --porcelain=v2 &&
- test_all_match git diff --staged --no-renames &&
- test_all_match git diff --staged --find-renames || return 1
+ test_all_match git diff --cached --no-renames &&
+ test_all_match git diff --cached --find-renames || return 1
done
'
@@ -450,8 +450,8 @@ test_expect_success 'diff with directory/file conflicts' '
test_all_match git checkout $branch &&
test_all_match git checkout rename-base -- . &&
test_all_match git status --porcelain=v2 &&
- test_all_match git diff --staged --no-renames &&
- test_all_match git diff --staged --find-renames || return 1
+ test_all_match git diff --cached --no-renames &&
+ test_all_match git diff --cached --find-renames || return 1
done
'