summaryrefslogtreecommitdiff
path: root/builtin/upload-archive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-01 14:09:14 +0900
committerJunio C Hamano <gitster@pobox.com>2017-06-01 14:56:18 +0900
commit60f32610243165e43afca785a85c38967130a70f (patch)
treeb32cebc3328c5e63aef5f573bd82569fb3c48caa /builtin/upload-archive.c
parent29ec62700ad3db6be572c6f3c03a7d0443c86353 (diff)
downloadgit-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/upload-archive.c')
-rw-r--r--builtin/upload-archive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
index cde06977b7..dfbbf131f6 100644
--- a/builtin/upload-archive.c
+++ b/builtin/upload-archive.c
@@ -76,6 +76,8 @@ int cmd_upload_archive(int argc, const char **argv, const char *prefix)
{
struct child_process writer = { argv };
+ check_help_option(argc, argv, upload_archive_usage, NULL);
+
/*
* Set up sideband subprocess.
*