summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t7508-status.sh10
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