Skip to content

Commit 3f54628

Browse files
committed
fixup! status: offer *not* to lock the index and update it
This re-adds the regression test that would have found the issue before releasing v2.15.0 *grrrr*. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4553883 commit 3f54628

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t7508-status.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,17 @@ test_expect_success '"Initial commit" should not be noted in commit template' '
16711671
test_i18ngrep ! "Initial commit" output
16721672
'
16731673

1674+
test_expect_success '--no-lock-index prevents index update and is deprecated' '
1675+
test-chmtime =1234567890 .git/index &&
1676+
git status --no-lock-index 2>err &&
1677+
grep "no-lock-index is deprecated" err &&
1678+
test-chmtime -v +0 .git/index >out &&
1679+
grep ^1234567890 out &&
1680+
git status &&
1681+
test-chmtime -v +0 .git/index >out &&
1682+
! grep ^1234567890 out
1683+
'
1684+
16741685
test_expect_success '--no-optional-locks prevents index update' '
16751686
test-chmtime =1234567890 .git/index &&
16761687
git --no-optional-locks status &&

0 commit comments

Comments
 (0)