git: synchronize update-index with a mutex#4130
Merged
deitch merged 1 commit intolinuxkit:masterfrom Jun 25, 2025
Merged
Conversation
if `pkglib.NewFromConfig` is used in parallel, it calls ``` git -C /some/directory update-index -q --refresh ``` in parallel. But `git` does not like this and exits with 128. This can be easily tried with: ``` git -C /some/dir update-index -q --refresh & \ git -C /some/dir update-index -q --refresh ``` Signed-off-by: Christoph Ostarek <christoph@zededa.com>
deitch
approved these changes
Jun 25, 2025
7 tasks
We need it in our PR template |
Contributor
Author
Actually I thought the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if
pkglib.NewFromConfigis used in parallel, it callsin parallel.
But
gitdoes not like this and exits with 128.This can be easily tried with:
- What I did
call
pkglib.NewFromConfigin parallel- How I did it
christoph-zededa/eve@1d09b27#diff-0d57db8877b73415b85ec56b72d4b265790a1d353d906b3574f6168227295719R149
- How to verify it
run the code with this fix
- Description for the changelog
fix parallel
pkglib.NewFromConfig- A picture of a cute animal (not mandatory but encouraged)