summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-11-03 00:21:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-06 01:59:37 (GMT)
commit7d8e72b9700022b3d8c57c3e2be97e52c2828e70 (patch)
treeb902a924e8a7b9ae7f470bf5a964bc705bdbfec9 /builtin/fetch.c
parentc14e6e790392647ed3b540b0be3d51d1b8a711c4 (diff)
downloadgit-7d8e72b9700022b3d8c57c3e2be97e52c2828e70.zip
git-7d8e72b9700022b3d8c57c3e2be97e52c2828e70.tar.gz
git-7d8e72b9700022b3d8c57c3e2be97e52c2828e70.tar.bz2
fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph
When both `fetch.jobs` and `fetch.writeCommitGraph` is set, we currently try to write the commit graph in each of the concurrent fetch jobs, which frequently leads to error messages like this one: fatal: Unable to create '.../.git/objects/info/commit-graphs/commit-graph-chain.lock': File exists. Let's avoid this by holding off from writing the commit graph until all fetch jobs are done. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 8d27f8a..20bcda0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1602,7 +1602,8 @@ static int fetch_multiple(struct string_list *list, int max_children)
return errcode;
}
- argv_array_pushl(&argv, "fetch", "--append", "--no-auto-gc", NULL);
+ argv_array_pushl(&argv, "fetch", "--append", "--no-auto-gc",
+ "--no-write-commit-graph", NULL);
add_options_to_argv(&argv);
if (max_children != 1 && list->nr != 1) {