Show usage string for 'git get-tar-commit-id -h'
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Nov 9, 2009 at 09:04 UTC
e9dd085d93fb6695f1d28572b48374ef818cf9c3
1 file changed
+6
builtin-tar-tree.c
+6
@@ -11,6 +11,9 @@ static const char tar_tree_usage[] =
11
"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
12
"*** Note that this command is now deprecated; use \"git archive\" instead.";
13
14
+static const char builtin_get_tar_commit_id_usage[] =
15
+"git get-tar-commit-id < <tarfile>";
16
+
17
int cmd_tar_tree(int argc, const char **argv, const char *prefix)
18
{
19
/*
@@ -81,6 +84,9 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
84
char *content = buffer + RECORDSIZE;
85
ssize_t n;
86
87
+ if (argc != 1)
88
+ usage(builtin_get_tar_commit_id_usage);
89
+
90
n = read_in_full(0, buffer, HEADERSIZE);
91
if (n < HEADERSIZE)
92
die("git get-tar-commit-id: read error");