Re: [PATCH 0/2] Fix locking issues with git fetch --multiple --jobs=<n> and fetch.writeCommitGraph
- From
Jeff King <peff@peff.net>
- Date
- Nov 4, 2019, 19:59 UTC
- Message-ID
- <20191104195928.GC20900@sigill.intra.peff.net>
- In-Reply-To
- <pull.443.git.1572740518.gitgitgadget@gmail.com>
On Sun, Nov 03, 2019 at 12:21:55AM +0000, Johannes Schindelin via GitGitGadget wrote:
Show 11 quoted lines
> The git fetch command recently learned to extend the --jobs=<n> option to > cover the --multiple mode: it will run multiple fetches in parallel. > > Together with the recent support to write commit-graphs automatically after > each fetch by setting fetch.writeCommitGraph, this led to frequent issues > where the commit-graph-chain.lock file could not be created because a > parallel job had already created it. > > This pair of patches first introduces the command-line option > --write-commit-graph (together with the --no-* variant) and then uses it to > avoid writing the commit-graph until all fetch jobs are complete.
Thanks, the whole thing looks clearly explained and the patches themselves look good. And having "--[no-]write-commit-graph" is a good thing even independent of the problem you're fixing.
I wondered if it was worth having a test in the second patch, but I think it would be inherently racy. So it's probably not worth the trouble.
-Peff