diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index af72a12a5798265cece6c7b72582fd3672421394..16c785f0477f2688632f3b67e39083f60e48b2db 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
#define QUOTE_SHELL 1
#define QUOTE_PERL 2
#define QUOTE_PYTHON 3
#define QUOTE_SHELL 1
#define QUOTE_PERL 2
#define QUOTE_PYTHON 3
+#define QUOTE_TCL 4
typedef enum { FIELD_STR, FIELD_ULONG, FIELD_TIME } cmp_type;
typedef enum { FIELD_STR, FIELD_ULONG, FIELD_TIME } cmp_type;
while (*cp) {
if (*cp == '%') {
/* %( is the start of an atom;
while (*cp) {
if (*cp == '%') {
/* %( is the start of an atom;
- * %% is a quoteed per-cent.
+ * %% is a quoted per-cent.
*/
if (cp[1] == '(')
return cp;
*/
if (cp[1] == '(')
return cp;
case QUOTE_PYTHON:
python_quote_print(stdout, v->s);
break;
case QUOTE_PYTHON:
python_quote_print(stdout, v->s);
break;
+ case QUOTE_TCL:
+ tcl_quote_print(stdout, v->s);
+ break;
}
}
}
}
quote_style = QUOTE_PYTHON;
continue;
}
quote_style = QUOTE_PYTHON;
continue;
}
+ if (!strcmp(arg, "--tcl") ) {
+ if (0 <= quote_style)
+ die("more than one quoting style?");
+ quote_style = QUOTE_TCL;
+ continue;
+ }
if (!strncmp(arg, "--count=", 8)) {
if (maxcount)
die("more than one --count?");
if (!strncmp(arg, "--count=", 8)) {
if (maxcount)
die("more than one --count?");