From f46bb7f2a5dbdcd0098904654f7d8742dc111c01 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 14 Nov 2026 01:49:56 +0000 Subject: populate: tell whether a Git work tree drawn from changed by its commit Whether a derived copy of a flake or flake-input source needs to be made again depends on the sources it draws inputs from. For one that isn't in the store, the key had its hash, so every run read all of it, e.g. all of a nixpkgs work tree, .git included, which takes long even when nothing changed. For a Git work tree that Nix gets as git+file:, whose commit and tracked files are all Nix uses, the key has its commit instead, if no tracked file differs from it, which Git tells quickly. git_flake decides what Nix gets as git+file:, for flake_url as well. Keys of copies drawing from such work trees change once, so those copies get made again on the first run. The keys are the same as krops 2's. rewrite-cache-git checks that such a copy gets made again for a new commit, but not for redeploying, nor for an untracked file. --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index c167ce7..774c818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changes +## Unreleased + +- Whether a copy of a `flake` or `flake-input` source drawing inputs from + a Git work tree that Nix gets as `git+file:` needs to be made again + depends on its commit, if no tracked file differs from it, instead of a + hash of all of the work tree, `.git` included, which populate read on + every run. Such copies get made again once. + ## 1.31.1 - Drawing an input from a source that isn't a directory stops populate, -- cgit v1.3.1