From: Jonathan Nieder Date: Mon, 09 Nov 2009 15:04:55 GMT Subject: [PATCH 15/24] Show usage string for 'git show-index -h' Message-ID: <1257779104-23884-15-git-send-email-jrnieder@gmail.com> In-Reply-To: <20091109150235.GA23871@progeny.tock> Signed-off-by: Jonathan Nieder --- show-index.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/show-index.c b/show-index.c index 45bb535..63f9da5 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)) { -- 1.6.5.2