From: Junio C Hamano Date: Fri, 17 Aug 2018 20:09:56 +0000 (-0700) Subject: Merge branch 'rs/parse-opt-lithelp' X-Git-Tag: v2.19.0-rc0~50 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8963bb0c2d023738f8ea021b512ed83cd79ee754 Merge branch 'rs/parse-opt-lithelp' The parse-options machinery learned to refrain from enclosing placeholder string inside a "" pair automatically without PARSE_OPT_LITERAL_ARGHELP. Existing help text for option arguments that are not formatted correctly have been identified and fixed. * rs/parse-opt-lithelp: parse-options: automatically infer PARSE_OPT_LITERAL_ARGHELP shortlog: correct option help for -w send-pack: specify --force-with-lease argument help explicitly pack-objects: specify --index-version argument help explicitly difftool: remove angular brackets from argument help add, update-index: fix --chmod argument help push: use PARSE_OPT_LITERAL_ARGHELP instead of unbalanced brackets --- 8963bb0c2d023738f8ea021b512ed83cd79ee754 diff --cc builtin/difftool.c index 3018e61d04,91dbef8f49..cdd585ca76 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@@ -696,14 -695,15 +696,14 @@@ int cmd_difftool(int argc, const char * N_("use `diff.guitool` instead of `diff.tool`")), OPT_BOOL('d', "dir-diff", &dir_diff, N_("perform a full-directory diff")), - { OPTION_SET_INT, 'y', "no-prompt", &prompt, NULL, + OPT_SET_INT_F('y', "no-prompt", &prompt, N_("do not prompt before launching a diff tool"), - PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 0}, - { OPTION_SET_INT, 0, "prompt", &prompt, NULL, NULL, - PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_HIDDEN, - NULL, 1 }, + 0, PARSE_OPT_NONEG), + OPT_SET_INT_F(0, "prompt", &prompt, NULL, + 1, PARSE_OPT_NONEG | PARSE_OPT_HIDDEN), OPT_BOOL(0, "symlinks", &symlinks, N_("use symlinks in dir-diff mode")), - OPT_STRING('t', "tool", &difftool_cmd, N_(""), + OPT_STRING('t', "tool", &difftool_cmd, N_("tool"), N_("use the specified diff tool")), OPT_BOOL(0, "tool-help", &tool_help, N_("print a list of diff tools that may be used with "