Skip to content

Commit b04d930

Browse files
apelissegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dff9f88 commit b04d930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/update-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
796796
};
797797

798798
if (argc == 2 && !strcmp(argv[1], "-h"))
799-
usage(update_index_usage[0]);
799+
usage_with_options(update_index_usage, options);
800800

801801
git_config(git_default_config, NULL);
802802

0 commit comments

Comments
 (0)