From: Jonathan Nieder Date: Mon, 9 Nov 2009 15:04:55 +0000 (-0600) Subject: Show usage string for 'git show-index -h' X-Git-Tag: v1.6.6-rc0~34^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03c5c10263fb0d80151d108a4c61253e1d0a8de6;p=git.git Show usage string for 'git show-index -h' Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/show-index.c b/show-index.c index 45bb53577..63f9da532 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 < "; + 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)) {