aboutsummaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2009-11-09 09:04:50 -0600
committerJunio C Hamano <gitster@pobox.com>2009-11-10 11:06:57 -0800
commite9dd085d93fb6695f1d28572b48374ef818cf9c3 (patch)
tree57b1c40ea8b4f9b1a9bb1684d591350b3787368f /builtin-tar-tree.c
parent71a04a8b52b8a89addd31da5b2272d572fdc7e40 (diff)
downloadgit-e9dd085d93fb6695f1d28572b48374ef818cf9c3.tar.gz
git-e9dd085d93fb6695f1d28572b48374ef818cf9c3.tar.xz
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>
Diffstat (limited to 'builtin-tar-tree.c')
-rw-r--r--builtin-tar-tree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index 8b3a35e12..3f1e7012d 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -11,6 +11,9 @@ static const char tar_tree_usage[] =
"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
"*** Note that this command is now deprecated; use \"git archive\" instead.";
+static const char builtin_get_tar_commit_id_usage[] =
+"git get-tar-commit-id < <tarfile>";
+
int cmd_tar_tree(int argc, const char **argv, const char *prefix)
{
/*
@@ -81,6 +84,9 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
char *content = buffer + RECORDSIZE;
ssize_t n;
+ if (argc != 1)
+ usage(builtin_get_tar_commit_id_usage);
+
n = read_in_full(0, buffer, HEADERSIZE);
if (n < HEADERSIZE)
die("git get-tar-commit-id: read error");