summaryrefslogtreecommitdiff
path: root/quote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-09 21:13:46 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-09 21:13:46 -0800
commit0d9d89f61c58f72d96585a61defb0634873c38ac (patch)
treefcb314481bb669dcf1f33ba3934786c1dcc51b12 /quote.c
parent14965530727e967806a5c62d7c826104baaec3c0 (diff)
parentc238dad407aec1ccf6e364f9c95e10e7f84eac8f (diff)
downloadgit-0d9d89f61c58f72d96585a61defb0634873c38ac.tar.gz
Merge master into aw/mirror-push
Diffstat (limited to 'quote.c')
-rw-r--r--quote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/quote.c b/quote.c
index 482be05b7a..04557833a5 100644
--- a/quote.c
+++ b/quote.c
@@ -26,7 +26,7 @@ void sq_quote_buf(struct strbuf *dst, const char *src)
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)) {
@@ -131,7 +131,8 @@ static signed char const sq_lookup[256] = {
/* 0x80 */ /* set to 0 */
};
-static inline int sq_must_quote(char c) {
+static inline int sq_must_quote(char c)
+{
return sq_lookup[(unsigned char)c] + quote_path_fully > 0;
}