diff options
authorJunio C Hamano <>2017-06-19 19:38:44 (GMT)
committerJunio C Hamano <>2017-06-19 19:38:44 (GMT)
commit06959fe0e1f50608ff872be386a7c53d97f885f4 (patch)
parenta6f38c109b6e70a1c788581194fc9b8669eea231 (diff)
parent154ffeecc6b13082b06fab96e5de698d606aa790 (diff)
Merge branch 'ab/perf-remove-index-lock'
When an existing repository is used for t/perf testing, we first create bit-for-bit copy of it, which may grab a transient state of the repository and freeze it into the repository used for testing, which then may cause Git operations to fail. Single out "the index being locked" case and forcibly drop the lock from the copy. * ab/perf-remove-index-lock: perf: work around the tested repo having an index.lock
1 files changed, 8 insertions, 1 deletions
diff --git a/t/perf/ b/t/perf/
index b6fc880..b50211b 100644
--- a/t/perf/
+++ b/t/perf/
@@ -108,7 +108,14 @@ test_perf_create_repo_from () {
cd "$repo" &&
"$MODERN_GIT" init -q &&
test_perf_do_repo_symlink_config_ &&
- mv .git/hooks .git/hooks-disabled 2>/dev/null
+ mv .git/hooks .git/hooks-disabled 2>/dev/null &&
+ if test -f .git/index.lock
+ then
+ # We may be copying a repo that can't run "git
+ # status" due to a locked index. Since we have
+ # a copy it's fine to remove the lock.
+ rm .git/index.lock
+ fi
) || error "failed to copy repository '$source' to '$repo'"