1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Git fetcher: Calculate a fingerprint for dirty workdirs

This restores evaluation caching for dirty Git workdirs.
This commit is contained in:
Eelco Dolstra 2024-11-29 16:55:27 +01:00
parent da7e3be8fc
commit 331bf3e261
3 changed files with 49 additions and 6 deletions

View file

@ -55,9 +55,14 @@ struct GitRepo
in the repo yet. */
std::optional<Hash> headRev;
enum State { Clean, Dirty };
/* All files in the working directory that are unchanged,
modified or added, but excluding deleted files. */
std::set<CanonPath> files;
std::map<CanonPath, State> files;
/* The deleted files. */
std::set<CanonPath> deletedFiles;
/* The submodules listed in .gitmodules of this workdir. */
std::vector<Submodule> submodules;