summaryrefslogtreecommitdiff
path: root/builtin-for-each-ref.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-06 12:24:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-06 15:53:20 (GMT)
commitc9ecf4f12aecabfad87507ebd133476ea99fe4cb (patch)
tree4a9e462c426f5b019d8741e9d240e2a8694027a7 /builtin-for-each-ref.c
parent90e0653b1824f27559cbc5c9d1f2a00fdb9400ba (diff)
downloadgit-c9ecf4f12aecabfad87507ebd133476ea99fe4cb.zip
git-c9ecf4f12aecabfad87507ebd133476ea99fe4cb.tar.gz
git-c9ecf4f12aecabfad87507ebd133476ea99fe4cb.tar.bz2
for-each-ref: Fix quoting style constants.
for-each-ref can accept only one quoting style. For this reason it uses OPT_BIT for the quoting style switches so that it is easy to check for more than one bit being set. However, not all symbolic constants were actually single bit values. In particular: $ git for-each-ref --python error: more than one quoting style ? This fixes it. While we are here, let's also remove the space before the question mark. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-for-each-ref.c')
-rw-r--r--builtin-for-each-ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index daf3a08..f36a43c 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -13,8 +13,8 @@
#define QUOTE_NONE 0
#define QUOTE_SHELL 1
#define QUOTE_PERL 2
-#define QUOTE_PYTHON 3
-#define QUOTE_TCL 4
+#define QUOTE_PYTHON 4
+#define QUOTE_TCL 8
typedef enum { FIELD_STR, FIELD_ULONG, FIELD_TIME } cmp_type;
@@ -861,7 +861,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
usage_with_options(for_each_ref_usage, opts);
}
if (HAS_MULTI_BITS(quote_style)) {
- error("more than one quoting style ?");
+ error("more than one quoting style?");
usage_with_options(for_each_ref_usage, opts);
}
if (verify_format(format))