Merge branch 'jk/no-optional-locks'
Some commands (most notably "git status") makes an opportunistic update when performing a read-only operation to help optimize later operations in the same repository. The new "--no-optional-locks" option can be passed to Git to disable them. * jk/no-optional-locks: git: add --no-optional-locks option
This commit is contained in:
@ -1670,4 +1670,14 @@ test_expect_success '"Initial commit" should not be noted in commit template' '
|
||||
test_i18ngrep ! "Initial commit" output
|
||||
'
|
||||
|
||||
test_expect_success '--no-optional-locks prevents index update' '
|
||||
test-chmtime =1234567890 .git/index &&
|
||||
git --no-optional-locks status &&
|
||||
test-chmtime -v +0 .git/index >out &&
|
||||
grep ^1234567890 out &&
|
||||
git status &&
|
||||
test-chmtime -v +0 .git/index >out &&
|
||||
! grep ^1234567890 out
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user