aboutsummaryrefslogtreecommitdiff
path: root/tests/fetchGit.sh
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-02-27 21:10:25 +0100
committerGitHub <noreply@github.com>2023-02-27 21:10:25 +0100
commiteae89aca1ba0f8147a01960afef1ce5bac6911b6 (patch)
tree58cb1646cb53286fee63296840239cce590bc2d3 /tests/fetchGit.sh
parentf08ad5bdbac02167f7d9f5e7f9bab57cf1c5f8c4 (diff)
parentae5082bbba5ddc7ac06e8b917c5a3dce267c66b7 (diff)
Merge pull request #7776 from yorickvP/fix-path-escapes-7707
Properly escape local paths into URLs in fetchTree
Diffstat (limited to 'tests/fetchGit.sh')
-rw-r--r--tests/fetchGit.sh14
1 files changed, 14 insertions, 0 deletions
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")