New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix locking issues with git fetch --multiple --jobs=<n>
and fetch.writeCommitGraph
#443
Fix locking issues with git fetch --multiple --jobs=<n>
and fetch.writeCommitGraph
#443
Conversation
This option overrides the config setting `fetch.writeCommitGraph`, if both are set. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
git fetch --multiple --jobs=<n>
and fetch.writeCommitGraph
/submit |
Submitted as pull.443.git.1572740518.gitgitgadget@gmail.com |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This branch is now known as |
This patch series was integrated into pu via git@37ff0f3. |
This patch series was integrated into pu via git@bbf700d. |
This patch series was integrated into pu via git@2ff8134. |
This patch series was integrated into pu via git@0c6f8fb. |
This patch series was integrated into pu via git@7fa890e. |
This patch series was integrated into pu via git@f322f4e. |
This patch series was integrated into pu via git@24a526b. |
This patch series was integrated into next via git@b9683b7. |
This patch series was integrated into pu via git@d02d16f. |
This patch series was integrated into pu via git@193c837. |
This patch series was integrated into pu via git@4f9c4c4. |
This patch series was integrated into pu via git@acb44ee. |
This patch series was integrated into pu via git@9da0221. |
This patch series was integrated into pu via git@bcb06e2. |
This patch series was integrated into next via git@bcb06e2. |
This patch series was integrated into master via git@bcb06e2. |
Closed via bcb06e2. |
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 thecommit-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.I don't think that we will want to rush this into Git v2.24.0 because that release is imminent, and this is quite a corner case that I am fixing here. It's more of a FYI that I send this before v2.24.0 is available.
Cc: Derrick Stolee dstolee@microsoft.com