mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 09:06:15 +02:00
Test fetchGit with non-'master' remote repo
This commit is contained in:
parent
401e60f289
commit
05a3fbac5a
1 changed files with 8 additions and 0 deletions
|
@ -161,6 +161,14 @@ path4=$(nix eval --impure --raw --expr "(builtins.fetchGit $repo).outPath")
|
||||||
[[ $(cat $path4/hello) = dev ]]
|
[[ $(cat $path4/hello) = dev ]]
|
||||||
[[ $path3 = $path4 ]]
|
[[ $path3 = $path4 ]]
|
||||||
|
|
||||||
|
# Using remote path with branch other than 'master' should fetch the HEAD revision.
|
||||||
|
# (--tarball-ttl 0 to prevent using the cached repo above)
|
||||||
|
export _NIX_FORCE_HTTP=1
|
||||||
|
path4=$(nix eval --tarball-ttl 0 --impure --raw --expr "(builtins.fetchGit $repo).outPath")
|
||||||
|
[[ $(cat $path4/hello) = dev ]]
|
||||||
|
[[ $path3 = $path4 ]]
|
||||||
|
unset _NIX_FORCE_HTTP
|
||||||
|
|
||||||
# Confirm same as 'dev' branch
|
# Confirm same as 'dev' branch
|
||||||
path5=$(nix eval --impure --raw --expr "(builtins.fetchGit { url = $repo; ref = \"dev\"; }).outPath")
|
path5=$(nix eval --impure --raw --expr "(builtins.fetchGit { url = $repo; ref = \"dev\"; }).outPath")
|
||||||
[[ $path3 = $path5 ]]
|
[[ $path3 = $path5 ]]
|
||||||
|
|
Loading…
Reference in a new issue