X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-commit-tree.c;h=90dac349a3137405baaea63bfb6c798d2f8c92a3;hb=cab1b013e6f7cc52806926a792c6798f4c7ac4be;hp=0453425c471f1d6793bc7f5f59d17e9d285ddfc6;hpb=96aa7adda3b0254e4b9904f53bb38cd76bfea7bb;p=git.git diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c index 0453425c4..90dac349a 100644 --- a/builtin-commit-tree.c +++ b/builtin-commit-tree.c @@ -9,8 +9,6 @@ #include "builtin.h" #include "utf8.h" -#define BLOCKING (1ul << 14) - /* * FIXME! Share the code with "write-tree.c" */ @@ -105,7 +103,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) git_config(git_default_config, NULL); - if (argc < 2) + if (argc < 2 || !strcmp(argv[1], "-h")) usage(commit_tree_usage); if (get_sha1(argv[1], tree_sha1)) die("Not a valid object name %s", argv[1]); @@ -124,7 +122,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix) } if (strbuf_read(&buffer, 0, 0) < 0) - die("git commit-tree: read returned %s", strerror(errno)); + die_errno("git commit-tree: failed to read"); if (!commit_tree(buffer.buf, tree_sha1, parents, commit_sha1, NULL)) { printf("%s\n", sha1_to_hex(commit_sha1));