summaryrefslogtreecommitdiff
path: root/show-index.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2009-11-09 09:04:55 -0600
committerJunio C Hamano <gitster@pobox.com>2009-11-10 11:06:57 -0800
commit03c5c10263fb0d80151d108a4c61253e1d0a8de6 (patch)
tree4cbad025ef1ec20bd6528fade51816791fcbc38e /show-index.c
parent7006b5beceb296e7e853806622204b2b55649fc5 (diff)
downloadgit-03c5c10263fb0d80151d108a4c61253e1d0a8de6.tar.gz
Show usage string for 'git show-index -h'
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'show-index.c')
-rw-r--r--show-index.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/show-index.c b/show-index.c
index 45bb535773..63f9da5323 100644
--- a/show-index.c
+++ b/show-index.c
@@ -1,6 +1,9 @@
#include "cache.h"
#include "pack.h"
+static const char show_index_usage[] =
+"git show-index < <packed archive index>";
+
int main(int argc, char **argv)
{
int i;
@@ -8,6 +11,8 @@ int main(int argc, char **argv)
unsigned int version;
static unsigned int top_index[256];
+ if (argc != 1)
+ usage(show_index_usage);
if (fread(top_index, 2 * 4, 1, stdin) != 1)
die("unable to read header");
if (top_index[0] == htonl(PACK_IDX_SIGNATURE)) {