summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Pelisse <apelisse@gmail.com>2013-02-23 18:10:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-24 07:49:33 (GMT)
commitb04d930bbcd1dc7cbb4524063ec339a8feb3cc12 (patch)
treec0c2393cd66e005d3aa7cd8fdf2612ebebf0045c
parentdff9f8835f2f2820c4e7109d242cb06b39f7d065 (diff)
downloadgit-b04d930bbcd1dc7cbb4524063ec339a8feb3cc12.zip
git-b04d930bbcd1dc7cbb4524063ec339a8feb3cc12.tar.gz
git-b04d930bbcd1dc7cbb4524063ec339a8feb3cc12.tar.bz2
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 <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-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 ada1dff..5c7762e 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);