Skip to content

Commit

Permalink
update-index: allow "-h" to also display options
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antoine Pelisse authored and Junio C Hamano committed Feb 24, 2013
1 parent dff9f88 commit b04d930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b04d930

Please sign in to comment.