fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraph
authorJohannes Schindelin <redacted>
Sun, 3 Nov 2019 00:21:57 +0000 (00:21 +0000)
committerJunio C Hamano <redacted>
Wed, 6 Nov 2019 01:59:37 +0000 (10:59 +0900)
commit7d8e72b9700022b3d8c57c3e2be97e52c2828e70
treeb902a924e8a7b9ae7f470bf5a964bc705bdbfec9
parentc14e6e790392647ed3b540b0be3d51d1b8a711c4
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/fetch.c
git clone https://git.99rst.org/PROJECT