summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2018-08-02 19:17:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-03 15:36:20 (GMT)
commit8b5ebbed0e793f6fcf92100e600b7a4bdd6452e9 (patch)
tree5b9abca72412b0a2603ef75fc4bc975b044e07a8 /builtin/update-index.c
parentc67318ecb6ddef6b9ecf59a422c4a282594e602d (diff)
downloadgit-8b5ebbed0e793f6fcf92100e600b7a4bdd6452e9.zip
git-8b5ebbed0e793f6fcf92100e600b7a4bdd6452e9.tar.gz
git-8b5ebbed0e793f6fcf92100e600b7a4bdd6452e9.tar.bz2
add, update-index: fix --chmod argument help
Don't translate the argument specification for --chmod; "+x" and "-x" are the literal strings that the commands accept. Separate alternatives using a pipe character instead of a slash, for consistency. Use the flag PARSE_OPT_LITERAL_ARGHELP to prevent parseopt from adding a pair of angular brackets around the argument help string, as that would wrongly indicate that users need to replace the literal strings with some kind of value. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 52eaeba..a2aee92 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -970,7 +970,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
PARSE_OPT_NOARG | /* disallow --cacheinfo=<mode> form */
PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
(parse_opt_cb *) cacheinfo_callback},
- {OPTION_CALLBACK, 0, "chmod", &set_executable_bit, N_("(+/-)x"),
+ {OPTION_CALLBACK, 0, "chmod", &set_executable_bit, "(+|-)x",
N_("override the executable bit of the listed files"),
PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
chmod_callback},