Skip to content

Commit 338e2a9

Browse files
ldenningtongitster
authored andcommitted
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 <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 44c7e62 commit 338e2a9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ test_expect_success 'checkout and reset --hard' '
401401
test_all_match git reset --hard update-folder2
402402
'
403403

404-
test_expect_success 'diff --staged' '
404+
test_expect_success 'diff --cached' '
405405
init_repos &&
406406
407407
write_script edit-contents <<-\EOF &&
@@ -410,10 +410,10 @@ test_expect_success 'diff --staged' '
410410
run_on_all ../edit-contents &&
411411
412412
test_all_match git diff &&
413-
test_all_match git diff --staged &&
413+
test_all_match git diff --cached &&
414414
test_all_match git add README.md &&
415415
test_all_match git diff &&
416-
test_all_match git diff --staged
416+
test_all_match git diff --cached
417417
'
418418

419419
# NEEDSWORK: sparse-checkout behaves differently from full-checkout when
@@ -430,8 +430,8 @@ test_expect_success 'diff with renames and conflicts' '
430430
test_all_match git checkout rename-base &&
431431
test_all_match git checkout $branch -- . &&
432432
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
435435
done
436436
'
437437

@@ -450,8 +450,8 @@ test_expect_success 'diff with directory/file conflicts' '
450450
test_all_match git checkout $branch &&
451451
test_all_match git checkout rename-base -- . &&
452452
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
455455
done
456456
'
457457

0 commit comments

Comments
 (0)