X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fcheckout-index.c;h=f1fec24745a854e77555a1b4bea3bc8d7ab04367;hb=184cb4d6899a2644b07c11bef71df869a851f525;hp=65cbee0552b8e2d5ed7cfd57781031d72c1cdd98;hpb=5ce3258122939f93a927c75d308c1c34038f0386;p=git.git diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c index 65cbee055..f1fec2474 100644 --- a/builtin/checkout-index.c +++ b/builtin/checkout-index.c @@ -217,9 +217,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix) struct option builtin_checkout_index_options[] = { OPT_BOOLEAN('a', "all", &all, "checks out all files in the index"), - OPT_BOOLEAN('f', "force", &force, - "forces overwrite of existing files"), - OPT__QUIET(&quiet), + OPT__FORCE(&force, "forces overwrite of existing files"), + OPT__QUIET(&quiet, + "no warning for existing files and files not in index"), OPT_BOOLEAN('n', "no-create", ¬_new, "don't checkout new files"), { OPTION_CALLBACK, 'u', "index", &newfd, NULL, @@ -241,6 +241,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix) OPT_END() }; + if (argc == 2 && !strcmp(argv[1], "-h")) + usage_with_options(builtin_checkout_index_usage, + builtin_checkout_index_options); git_config(git_default_config, NULL); state.base_dir = ""; prefix_length = prefix ? strlen(prefix) : 0;