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>
Lessley Dennington committed
Dec 6, 2021 at 15:55 UTC
338e2a9acc801ed4c5153b926579e7bea55a0be9
1 file changed
+7
-7
t/t1092-sparse-checkout-compatibility.sh
+7
-7
@@ -401,7 +401,7 @@ test_expect_success 'checkout and reset --hard' '
401
test_all_match git reset --hard update-folder2
402
'
403
404
-test_expect_success 'diff --staged' '
404
+test_expect_success 'diff --cached' '
405
init_repos &&
406
407
write_script edit-contents <<-\EOF &&
@@ -410,10 +410,10 @@ test_expect_success 'diff --staged' '
410
run_on_all ../edit-contents &&
411
412
test_all_match git diff &&
413
- test_all_match git diff --staged &&
413
+ test_all_match git diff --cached &&
414
test_all_match git add README.md &&
415
test_all_match git diff &&
416
- test_all_match git diff --staged
416
+ test_all_match git diff --cached
417
'
418
419
# NEEDSWORK: sparse-checkout behaves differently from full-checkout when
@@ -430,8 +430,8 @@ test_expect_success 'diff with renames and conflicts' '
430
test_all_match git checkout rename-base &&
431
test_all_match git checkout $branch -- . &&
432
test_all_match git status --porcelain=v2 &&
433
- test_all_match git diff --staged --no-renames &&
434
- test_all_match git diff --staged --find-renames || return 1
433
+ test_all_match git diff --cached --no-renames &&
434
+ test_all_match git diff --cached --find-renames || return 1
435
done
436
'
437
@@ -450,8 +450,8 @@ test_expect_success 'diff with directory/file conflicts' '
450
test_all_match git checkout $branch &&
451
test_all_match git checkout rename-base -- . &&
452
test_all_match git status --porcelain=v2 &&
453
- test_all_match git diff --staged --no-renames &&
454
- test_all_match git diff --staged --find-renames || return 1
453
+ test_all_match git diff --cached --no-renames &&
454
+ test_all_match git diff --cached --find-renames || return 1
455
done
456
'
457