Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Jun 26, 2025

- What I did
Removed git update-index from checking if a tree is dirty via Git.isDirty(). It was slow and not parallel safe. If anyone else - another linuxkit process or someone outside - runs anything that affects the index anywhere in the repo, it can be an issue.

Instead, use a series of other git commands to check if the tree is dirty.

Note that there is a slight chance that a file with no modifications except modtime could make it look dirty. That is an acceptable price to pay.

- How I did it

Changed git.go

- How to verify it
CI will be fine. I also did it manually, testing different scenarios of a package being dirty and clean in different ways.

- Description for the changelog

Ability to run multiple git calls, including pkg show-tag and pkg build, as well as other git commands, in parallel.

@deitch deitch force-pushed the git-remove-update-index branch from 8eabfb8 to 8ddef0f Compare June 26, 2025 16:10
@deitch deitch merged commit 254aefc into linuxkit:master Jun 26, 2025
22 checks passed
@deitch deitch deleted the git-remove-update-index branch June 26, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant