summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-04 20:26:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-04 23:16:59 (GMT)
commitc2015b3ae0d52ccae33ee00c2b25b8402c66bdf0 (patch)
tree89cbc34d7def468e193b431bacb07c88d305cb9a /t
parent140dd77a5cb2e61dcb942e245a2474fae95e42a5 (diff)
downloadgit-c2015b3ae0d52ccae33ee00c2b25b8402c66bdf0.zip
git-c2015b3ae0d52ccae33ee00c2b25b8402c66bdf0.tar.gz
git-c2015b3ae0d52ccae33ee00c2b25b8402c66bdf0.tar.bz2
Fix an infinite loop in sq_quote_buf().
sq_quote_buf() treats single-quotes and exclamation marks specially, but it incorrectly parsed the input for single-quotes and backslashes. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5510-fetch.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index d217657..aad863d 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -208,4 +208,11 @@ test_expect_success 'fetch with a non-applying branch.<name>.merge' '
git fetch blub
'
+# the strange name is: a\!'b
+test_expect_success 'quoting of a strangely named repo' '
+ ! git fetch "a\\!'\''b" > result 2>&1 &&
+ cat result &&
+ grep "fatal: '\''a\\\\!'\''b'\''" result
+'
+
test_done