1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Fix fetchGit functional tests to peel as well

This commit is contained in:
Farid Zakaria 2025-07-21 22:01:05 -07:00
parent 98858148dc
commit aadfb682d4

View file

@ -236,10 +236,10 @@ path9=$(nix eval --impure --raw --expr "(builtins.fetchGit { url = \"file://$rep
# Specifying a ref without a rev shouldn't pick a cached rev for a different ref
export _NIX_FORCE_HTTP=1
rev_tag1_nix=$(nix eval --impure --raw --expr "(builtins.fetchGit { url = \"file://$repo\"; ref = \"refs/tags/tag1\"; }).rev")
rev_tag1=$(git -C $repo rev-parse refs/tags/tag1)
rev_tag1=$(git -C $repo rev-parse refs/tags/tag1^{commit})
[[ $rev_tag1_nix = $rev_tag1 ]]
rev_tag2_nix=$(nix eval --impure --raw --expr "(builtins.fetchGit { url = \"file://$repo\"; ref = \"refs/tags/tag2\"; }).rev")
rev_tag2=$(git -C $repo rev-parse refs/tags/tag2)
rev_tag2=$(git -C $repo rev-parse refs/tags/tag2^{commit})
[[ $rev_tag2_nix = $rev_tag2 ]]
unset _NIX_FORCE_HTTP