Skip to content

Git fetcher: Do not consider a null revision (i.e. workdir) to be locked #13369

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

edolstra
Copy link
Member

Motivation

The Git fetcher returns a rev of 0000... for dirty workdirs. This caused isLocked() to consider such inputs to be locked, which is incorrect.

(Probably the fetcher shouldn't return that 0000... rev in the first place, but we're doing that for backwards compatibility.)

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the fetching Networking with the outside (non-Nix) world, input locking label Jun 17, 2025
@roberth
Copy link
Member

roberth commented Jun 20, 2025

fetchTree is still experimental.

the fetcher shouldn't return that 0000... rev in the first place, but we're doing that for backwards compatibility.

Does fetchGit require this? If so, I suggest we fix this for fetchTree only, e.g. by making fetchGit patch up its output attributes.

@edolstra edolstra merged commit d4f67fd into master Jul 3, 2025
25 checks passed
@edolstra edolstra deleted the null-revision-not-locked branch July 3, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetching Networking with the outside (non-Nix) world, input locking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants