[PATCH 11/24] Show usage string for 'git imap-send -h'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
 imap-send.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/imap-send.c b/imap-send.c
index 3847fd1..04e5374 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -93,6 +93,8 @@ struct msg_data {
 	unsigned int crlf:1;
 };
 
+static const char imap_send_usage[] = "git imap-send < <mbox>";
+
 #define DRV_OK          0
 #define DRV_MSG_BAD     -1
 #define DRV_BOX_BAD     -2
@@ -1491,6 +1493,9 @@ int main(int argc, char **argv)
 
 	git_extract_argv0_path(argv[0]);
 
+	if (argc != 1)
+		usage(imap_send_usage);
+
 	/* init the random number generator */
 	arc4_init();
 
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]