about summary refs log tree commit diff
path: root/tests/fetchGit.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-11-21T18·12+0100
committerEelco Dolstra <edolstra@gmail.com>2017-11-21T18·34+0100
commitd7da6c9ea9459a2fa17c3e409120c5cdfde6afdc (patch)
tree26676469ead12a6581c2301d395283129dd64f0d /tests/fetchGit.sh
parent6cdaa858d03b9c24f54f8157026cebaa02d9ac8a (diff)
fetchGit/fetchMercurial: Fix directory inclusion check
E.g. the existence of .gitignore would cause .git to be included.
Diffstat (limited to 'tests/fetchGit.sh')
-rw-r--r--tests/fetchGit.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh
index f13de89f7ff4..7b13b587defb 100644
--- a/tests/fetchGit.sh
+++ b/tests/fetchGit.sh
@@ -16,7 +16,8 @@ git -C $repo config user.email "foobar@example.com"
 git -C $repo config user.name "Foobar"
 
 echo utrecht > $repo/hello
-git -C $repo add hello
+touch $repo/.gitignore
+git -C $repo add hello .gitignore
 git -C $repo commit -m 'Bla1'
 rev1=$(git -C $repo rev-parse HEAD)
 
@@ -68,6 +69,7 @@ path2=$(nix eval --raw "(builtins.fetchGit $repo).outPath")
 [ ! -e $path2/hello ]
 [ ! -e $path2/bar ]
 [ ! -e $path2/dir2/bar ]
+[ ! -e $path2/.git ]
 [[ $(cat $path2/dir1/foo) = foo ]]
 
 [[ $(nix eval --raw "(builtins.fetchGit $repo).rev") = 0000000000000000000000000000000000000000 ]]