зеркало из https://github.com/microsoft/git.git
perf: work around the tested repo having an index.lock
When the tested repo has an index.lock file it should be removed. This file may be present if e.g. git-status previously crashed in that repo, and it will make a lot of git commands fail. Let's try harder and remove the lock. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
69e6b9b4f4
Коммит
154ffeecc6
|
@ -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'"
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче