mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
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>
This commit is contained in:
parent
7006b5bece
commit
03c5c10263
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user