Re: [PATCH 1/1] Teach for-each-ref about a little language called Tcl.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sergey Vlasov <vsu@xxxxxxxxxxx> writes:

> This is better; however, wrapping this format inside { ... } (which
> you may want to do in the template for some uses) won't work if the
> string contains unmatched braces.  Quoting '{' and '}' characters with
> backslashes should fix this.

Then I'd commit after applying this on top of Shawn's.  Ok?

diff --git a/quote.c b/quote.c
index 01db5e2..fb9e4ca 100644
--- a/quote.c
+++ b/quote.c
@@ -395,11 +395,9 @@ void tcl_quote_print(FILE *stream, const char *src)
 	fputc('"', stream);
 	while ((c = *src++)) {
 		switch (c) {
-		case '[':
-		case ']':
-		case '$':
-		case '\\':
-		case '"':
+		case '[': case ']':
+		case '{': case '}':
+		case '$': case '\\': case '"':
 			fputc('\\', stream);
 		default:
 			fputc(c, stream);

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]