Skip to content

Call Git clean filter for files in workdir as needed #13464

@roberth

Description

@roberth

Describe the bug

Currently we use un-smudge-ed aka clean blobs when getting files from a remote Git repo.
However, when the workdir has dirty files, we do not clean the files as part of the fetching.

Steps To Reproduce

  1. Have a local repo with smudging
  2. Edit a smudged file, do not commit
  3. nix build with it
  4. Commit and push to remote (remote shouldn't be necessary for the repro, but this is likely where users encounter it)
  5. nix build the remote with the commit
  6. Observe that 4 or the combination of 4 and 5 have clean-ed the file, and the evaluation of 3 and 5 are different.

Expected behavior

Git-managed repos always produce the same results, as if the changes were committed.

Metadata

Additional context

I've found this problem by reading the source some time ago, but this has not been fixed yet.


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfetchingNetworking with the outside (non-Nix) world, input lockingidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions