mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Merge branch 'fetchGit-fast-revision-update'
This commit is contained in:
commit
11a7f8ce14
3 changed files with 43 additions and 24 deletions
|
@ -21,6 +21,7 @@ export NIX_REMOTE=$NIX_REMOTE_
|
|||
unset NIX_PATH
|
||||
export TEST_HOME=$TEST_ROOT/test-home
|
||||
export HOME=$TEST_HOME
|
||||
unset XDG_CACHE_HOME
|
||||
mkdir -p $TEST_HOME
|
||||
|
||||
export PATH=@bindir@:$PATH
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue