From ae5082bbba5ddc7ac06e8b917c5a3dce267c66b7 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 27 Feb 2023 15:33:54 +0100 Subject: [PATCH] tests/fetchGit: add regression test for #7707 --- tests/fetchGit.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/fetchGit.sh b/tests/fetchGit.sh index da09c3f37..a7a8df186 100644 --- a/tests/fetchGit.sh +++ b/tests/fetchGit.sh @@ -237,3 +237,17 @@ rm -rf $repo/.git # should succeed for a repo without commits git init $repo path10=$(nix eval --impure --raw --expr "(builtins.fetchGit \"file://$repo\").outPath") + +# should succeed for a path with a space +# regression test for #7707 +repo="$TEST_ROOT/a b" +git init "$repo" +git -C "$repo" config user.email "foobar@example.com" +git -C "$repo" config user.name "Foobar" + +echo utrecht > "$repo/hello" +touch "$repo/.gitignore" +git -C "$repo" add hello .gitignore +git -C "$repo" commit -m 'Bla1' +cd "$repo" +path11=$(nix eval --impure --raw --expr "(builtins.fetchGit ./.).outPath")