Browse Source

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>
maint
Jonathan Nieder 15 years ago committed by Junio C Hamano
parent
commit
03c5c10263
  1. 5
      show-index.c

5
show-index.c

@ -1,6 +1,9 @@ @@ -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) @@ -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)) {

Loading…
Cancel
Save