diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:49 +0900 |
| commit | d4e93836a6a072e392b20d7daf604fd41e15ecf9 (patch) | |
| tree | 69f37e3a5a7239b416a0c75b9d52114cb9e048d3 /t | |
| parent | d9ec072a2903f31a0e1afde4125f62b9fc57f620 (diff) | |
| parent | 27344d6a6c8056664966e11acf674e5da6dd7ee3 (diff) | |
| download | git-d4e93836a6a072e392b20d7daf604fd41e15ecf9.tar.xz | |
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
Diffstat (limited to 't')
| -rwxr-xr-x | t/t7508-status.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 43d19a9b22..93f162a4f7 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -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 |
