Skip to content

Commit

Permalink
fixup! status: offer *not* to lock the index and update it
Browse files Browse the repository at this point in the history
This re-adds the regression test that would have found the issue before
releasing v2.15.0 *grrrr*.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 2, 2017
1 parent 4553883 commit 3f54628
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/t7508-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,17 @@ test_expect_success '"Initial commit" should not be noted in commit template' '
test_i18ngrep ! "Initial commit" output
'

test_expect_success '--no-lock-index prevents index update and is deprecated' '
test-chmtime =1234567890 .git/index &&
git status --no-lock-index 2>err &&
grep "no-lock-index is deprecated" err &&
test-chmtime -v +0 .git/index >out &&
grep ^1234567890 out &&
git status &&
test-chmtime -v +0 .git/index >out &&
! grep ^1234567890 out
'

test_expect_success '--no-optional-locks prevents index update' '
test-chmtime =1234567890 .git/index &&
git --no-optional-locks status &&
Expand Down

0 comments on commit 3f54628

Please sign in to comment.