From: Antoine Pelisse Date: Sat, 23 Feb 2013 18:10:41 +0000 (+0100) Subject: update-index: allow "-h" to also display options X-Git-Tag: v1.8.1.6~10^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b04d930bbcd1dc7cbb4524063ec339a8feb3cc12;p=git-core%2Fgit.git update-index: allow "-h" to also display options Even though "git update-index" was updated to use parse-options infrastracture some time ago to make it possible to show list of options with usage_with_options(), "git update-index -h" only shows the usage. Detect this case and call usage_with_options() to show the list of options as well. Signed-off-by: Antoine Pelisse Signed-off-by: Junio C Hamano --- diff --git a/builtin/update-index.c b/builtin/update-index.c index ada1dff84..5c7762eef 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -796,7 +796,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) }; if (argc == 2 && !strcmp(argv[1], "-h")) - usage(update_index_usage[0]); + usage_with_options(update_index_usage, options); git_config(git_default_config, NULL);