summaryrefslogtreecommitdiff
path: root/t/t5615-alternate-env.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-21 22:55:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-21 22:55:02 (GMT)
commitfe050334074c5132d01e1df2c1b9a82c9b8d394c (patch)
treea5d4136c6aa15eae56ff19c3fffb94acad289757 /t/t5615-alternate-env.sh
parent1123026f0bf6cd6c63e0711ef19567e0048d0b6a (diff)
parent5e74824fac646e2ebe335a00bcecd91641a7f7ca (diff)
downloadgit-fe050334074c5132d01e1df2c1b9a82c9b8d394c.zip
git-fe050334074c5132d01e1df2c1b9a82c9b8d394c.tar.gz
git-fe050334074c5132d01e1df2c1b9a82c9b8d394c.tar.bz2
Merge branch 'jk/quote-env-path-list-component'
A recent update to receive-pack to make it easier to drop garbage objects made it clear that GIT_ALTERNATE_OBJECT_DIRECTORIES cannot have a pathname with a colon in it (no surprise!), and this in turn made it impossible to push into a repository at such a path. This has been fixed by introducing a quoting mechanism used when appending such a path to the colon-separated list. * jk/quote-env-path-list-component: t5615-alternate-env: double-quotes in file names do not work on Windows t5547-push-quarantine: run the path separator test on Windows, too tmp-objdir: quote paths we add to alternates alternates: accept double-quoted paths
Diffstat (limited to 't/t5615-alternate-env.sh')
-rwxr-xr-xt/t5615-alternate-env.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t5615-alternate-env.sh b/t/t5615-alternate-env.sh
index eec4137..26ebb03 100755
--- a/t/t5615-alternate-env.sh
+++ b/t/t5615-alternate-env.sh
@@ -68,4 +68,22 @@ test_expect_success 'access alternate via relative path (subdir)' '
EOF
'
+# set variables outside test to avoid quote insanity; the \057 is '/',
+# which doesn't need quoting, but just confirms that de-quoting
+# is working.
+quoted='"one.git\057objects"'
+unquoted='two.git/objects'
+test_expect_success 'mix of quoted and unquoted alternates' '
+ check_obj "$quoted:$unquoted" <<-EOF
+ $one blob
+ $two blob
+'
+
+test_expect_success !MINGW 'broken quoting falls back to interpreting raw' '
+ mv one.git \"one.git &&
+ check_obj \"one.git/objects <<-EOF
+ $one blob
+ EOF
+'
+
test_done