1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

builtins.fetchGit: Fix shortRev attribute for dirty trees

This commit is contained in:
Eelco Dolstra 2020-11-26 21:45:28 +01:00
parent 2458270b69
commit 05d9442f68
2 changed files with 3 additions and 1 deletions

View file

@ -39,7 +39,7 @@ void emitTreeAttrs(
// Backwards compat for `builtins.fetchGit`: dirty repos return an empty sha1 as rev
auto emptyHash = Hash(htSHA1);
mkString(*state.allocAttr(v, state.symbols.create("rev")), emptyHash.gitRev());
mkString(*state.allocAttr(v, state.symbols.create("shortRev")), emptyHash.gitRev());
mkString(*state.allocAttr(v, state.symbols.create("shortRev")), emptyHash.gitShortRev());
}
if (input.getType() == "git")