mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
In flake lock file diffs, show the last-modified date of inputs if available
This is a bit more informative than just the hash. Also, format the diffs a bit nicer.
This commit is contained in:
parent
467a6fcdc2
commit
6b8069b823
2 changed files with 19 additions and 6 deletions
|
@ -567,8 +567,8 @@ LockedFlake lockFlake(
|
|||
topRef.input.markChangedFile(
|
||||
(topRef.subdir == "" ? "" : topRef.subdir + "/") + "flake.lock",
|
||||
lockFlags.commitLockFile
|
||||
? std::optional<std::string>(fmt("%s: %s\n\nFlake input changes:\n\n%s",
|
||||
relPath, lockFileExists ? "Update" : "Add", diff))
|
||||
? std::optional<std::string>(fmt("%s: %s\n\nFlake lock file changes:\n\n%s",
|
||||
relPath, lockFileExists ? "Update" : "Add", filterANSIEscapes(diff, true)))
|
||||
: std::nullopt);
|
||||
|
||||
/* Rewriting the lockfile changed the top-level
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue