summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2018-08-02 19:18:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-03 15:36:20 (GMT)
commit5f0df44cd79a953c287ccb598896ea7aaa2cc9e3 (patch)
treed438018d4b5dec908b60bd46913e36a8e6304ade /builtin/pack-objects.c
parentb8ade4c5766774207e05c8f92e262f8f6835bd3d (diff)
downloadgit-5f0df44cd79a953c287ccb598896ea7aaa2cc9e3.zip
git-5f0df44cd79a953c287ccb598896ea7aaa2cc9e3.tar.gz
git-5f0df44cd79a953c287ccb598896ea7aaa2cc9e3.tar.bz2
parse-options: automatically infer PARSE_OPT_LITERAL_ARGHELP
Parseopt wraps argument help strings in a pair of angular brackets by default, to tell users that they need to replace it with an actual value. This is useful in most cases, because most option arguments are indeed single values of a certain type. The option PARSE_OPT_LITERAL_ARGHELP needs to be used in option definitions with arguments that have multiple parts or are literal strings. Stop adding these angular brackets if special characters are present, as they indicate that we don't deal with a simple placeholder. This simplifies the code a bit and makes defining special options slightly easier. Remove the flag PARSE_OPT_LITERAL_ARGHELP in the cases where the new and more cautious handling suffices. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 5d7566a..1529a75 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2943,7 +2943,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
N_("similar to --all-progress when progress meter is shown")),
{ OPTION_CALLBACK, 0, "index-version", NULL, N_("<version>[,<offset>]"),
N_("write the pack index file in the specified idx format version"),
- PARSE_OPT_LITERAL_ARGHELP, option_parse_index_version },
+ 0, option_parse_index_version },
OPT_MAGNITUDE(0, "max-pack-size", &pack_size_limit,
N_("maximum size of each output pack file")),
OPT_BOOL(0, "local", &local,