提交 03c5c102 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

Show usage string for 'git show-index -h'

Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 7006b5be
#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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册