X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=show-index.c;h=63f9da53237d4233bede66a28e4bcf27d5b44af1;hb=f287c65b265e8c676e65ade4ecb2d3a0243411fa;hp=45bb535773fd9c36f73502df9462f7de800009c8;hpb=f8c62880ef22b74ea6df47bb349ff0743d2a93f9;p=git.git 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)) {