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>
This commit is contained in:
Antoine Pelisse 2013-02-23 19:10:41 +01:00 коммит произвёл Junio C Hamano
Родитель dff9f8835f
Коммит b04d930bbc
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);