X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=index-pack.c;h=190f372dd81f85d76068b166cc1688487640fdba;hb=c34ec65567793d16119c28df6ebeecfe8eb3d9f5;hp=340074fc793e8e7534bb168784a7051af6d81b34;hpb=4a224a9bbec4e7a1a4dcb7a91e663483dc477b78;p=git.git diff --git a/index-pack.c b/index-pack.c index 340074fc7..190f372dd 100644 --- a/index-pack.c +++ b/index-pack.c @@ -206,8 +206,8 @@ static void parse_pack_header(void) use(sizeof(struct pack_header)); } -static void bad_object(unsigned long offset, const char *format, - ...) NORETURN __attribute__((format (printf, 2, 3))); +static NORETURN void bad_object(unsigned long offset, const char *format, + ...) __attribute__((format (printf, 2, 3))); static void bad_object(unsigned long offset, const char *format, ...) { @@ -882,6 +882,9 @@ int main(int argc, char **argv) git_extract_argv0_path(argv[0]); + if (argc == 2 && !strcmp(argv[1], "-h")) + usage(index_pack_usage); + /* * We wish to read the repository's config file if any, and * for that it is necessary to call setup_git_directory_gently().