From ee6ac38848277d80c62fa5c2734ada1b5edc8680 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 3 Nov 2017 13:48:02 +0100 Subject: fetchGit/fetchMercurial: Filter out directories with untracked files --- tests/fetchGit.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/fetchGit.sh') diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh index e2bb7b68c4f3..a967380cd5b2 100644 --- a/tests/fetchGit.sh +++ b/tests/fetchGit.sh @@ -57,15 +57,18 @@ path2=$(nix eval --raw "(builtins.fetchGit $repo).outPath") [[ $path = $path2 ]] # Using an unclean tree should yield the tracked but uncommitted changes. -echo foo > $repo/foo +mkdir $repo/dir1 $repo/dir2 +echo foo > $repo/dir1/foo echo bar > $repo/bar -git -C $repo add foo +echo bar > $repo/dir2/bar +git -C $repo add dir1/foo git -C $repo rm hello path2=$(nix eval --raw "(builtins.fetchGit $repo).outPath") [ ! -e $path2/hello ] [ ! -e $path2/bar ] -[[ $(cat $path2/foo) = foo ]] +[ ! -e $path2/dir2/bar ] +[[ $(cat $path2/dir1/foo) = foo ]] [[ $(nix eval --raw "(builtins.fetchGit $repo).rev") = 0000000000000000000000000000000000000000 ]] -- cgit 1.4.1