about summary refs log tree commit diff
path: root/tests/fetchGit.sh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-11-24T02·50-0500
committerShea Levy <shea@shealevy.com>2017-11-24T11·09-0500
commiteedbc4e06c017d84814b4c1fad8c6b6db958f3da (patch)
tree885dc17d173e83d6fe943a417790232c47f08c7b /tests/fetchGit.sh
parent0fc3e581e0585e377d4b42e343b0487606add547 (diff)
fetchGit: Ignore tarballTtl if rev is set and not in the repo.
Fixes #1697.
Diffstat (limited to 'tests/fetchGit.sh')
-rw-r--r--tests/fetchGit.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh
index 7b13b587defb..09e4f742668e 100644
--- a/tests/fetchGit.sh
+++ b/tests/fetchGit.sh
@@ -86,3 +86,10 @@ git -C $repo commit -m 'Bla3' -a
 
 path4=$(nix eval --tarball-ttl 0 --raw "(builtins.fetchGit file://$repo).outPath")
 [[ $path2 = $path4 ]]
+
+# tarball-ttl should be ignored if we specify a rev
+echo delft > $repo/hello
+git -C $repo add hello
+git -C $repo commit -m 'Bla4'
+rev3=$(git -C $repo rev-parse HEAD)
+nix eval --tarball-ttl 3600 "(builtins.fetchGit { url = $repo; rev = \"$rev3\"; })" >/dev/null