diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-01 14:09:14 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-01 14:56:18 +0900 |
commit | 60f32610243165e43afca785a85c38967130a70f (patch) | |
tree | b32cebc3328c5e63aef5f573bd82569fb3c48caa /builtin/index-pack.c | |
parent | 29ec62700ad3db6be572c6f3c03a7d0443c86353 (diff) | |
download | git-jc/wip-check-help-option.tar.gz |
check_help_option(): a helper for early check of "-h" optionjc/wip-check-help-option
As "show help when we get '-h' as the only option." often appears,
let's give an easy helper to call for these call sites.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r-- | builtin/index-pack.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 04b9dcaf0f..2be24276d6 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1640,8 +1640,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) unsigned foreign_nr = 1; /* zero is a "good" value, assume bad */ int report_end_of_input = 0; - if (argc == 2 && !strcmp(argv[1], "-h")) - usage(index_pack_usage); + check_help_option(argc, argv, index_pack_usage, NULL); check_replace_refs = 0; fsck_options.walk = mark_link; |