summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 140dd77)
raw | patch | inline | side by side (parent: 140dd77)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Sun, 4 Nov 2007 20:26:22 +0000 (21:26 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Nov 2007 23:16:59 +0000 (15:16 -0800) |
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>
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>
quote.c | patch | blob | history | |
t/t5510-fetch.sh | patch | blob | history |
index 482be05b7af159b9b47095fedfbdfa3bda65c748..919d0920abfc0bd2becbcc35fd065514b9651281 100644 (file)
--- a/quote.c
+++ b/quote.c
strbuf_addch(dst, '\'');
while (*src) {
- size_t len = strcspn(src, "'\\");
+ size_t len = strcspn(src, "'!");
strbuf_add(dst, src, len);
src += len;
while (need_bs_quote(*src)) {
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index d2176571462af7dd66ecdb197731cd9d810dccdf..aad863db7ad74ed217b3bcc76de43556f9fe7a07 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
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