diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-11-26 21:45:28 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-11-26 21:45:28 +0100 |
commit | 05d9442f68ba906ae50c12deab63fc1b9836b149 (patch) | |
tree | 242bc7187de1d57618715fa0258d089270f3b8e3 /tests/fetchGit.sh | |
parent | 2458270b69b28d17c5a89f7b006e4df550435477 (diff) |
builtins.fetchGit: Fix shortRev attribute for dirty trees
Diffstat (limited to 'tests/fetchGit.sh')
-rw-r--r-- | tests/fetchGit.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh index cedd796f7..76390fa59 100644 --- a/tests/fetchGit.sh +++ b/tests/fetchGit.sh @@ -59,6 +59,7 @@ path2=$(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).outPath [[ $(nix eval --impure --expr "(builtins.fetchGit file://$repo).revCount") = 2 ]] [[ $(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).rev") = $rev2 ]] +[[ $(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).shortRev") = ${rev2:0:7} ]] # Fetching with a explicit hash should succeed. path2=$(nix eval --refresh --raw --expr "(builtins.fetchGit { url = file://$repo; rev = \"$rev2\"; }).outPath") @@ -132,6 +133,7 @@ path2=$(nix eval --impure --raw --expr "(builtins.fetchGit file://$repo).outPath path3=$(nix eval --impure --raw --expr "(builtins.fetchGit $repo).outPath") # (check dirty-tree handling was used) [[ $(nix eval --impure --raw --expr "(builtins.fetchGit $repo).rev") = 0000000000000000000000000000000000000000 ]] +[[ $(nix eval --impure --raw --expr "(builtins.fetchGit $repo).shortRev") = 0000000 ]] # Committing shouldn't change store path, or switch to using 'master' git -C $repo commit -m 'Bla5' -a |