1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

fetchGit: Ignore tarballTtl if rev is set and not in the repo.

Fixes #1697.
This commit is contained in:
Shea Levy 2017-11-23 21:50:01 -05:00
parent 0fc3e581e0
commit eedbc4e06c
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
3 changed files with 43 additions and 24 deletions

View file

@ -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