diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-08 16:43:23 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-08 16:43:23 -0700 |
commit | bd8e265d67d93e83ee48fed565627522c1553654 (patch) | |
tree | ae1e7b666f0f6698dda7d24e10064768edbe5299 /commit-tree.c | |
parent | Merge branch 'jc/bindiff' into next (diff) | |
parent | Teach git-clean optional <paths>... parameters. (diff) | |
download | tgif-bd8e265d67d93e83ee48fed565627522c1553654.tar.xz |
Merge branch 'jc/clean' into next
* jc/clean:
Teach git-clean optional <paths>... parameters.
Separate object name errors from usage errors
Documentation: {caret} fixes (git-rev-list.txt)
Fix "git diff --stat" with long filenames
Fix repo-config set-multivar error return path.
Diffstat (limited to 'commit-tree.c')
-rw-r--r-- | commit-tree.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/commit-tree.c b/commit-tree.c index bad72e89e8..0320036e80 100644 --- a/commit-tree.c +++ b/commit-tree.c @@ -91,15 +91,19 @@ int main(int argc, char **argv) git_config(git_default_config); - if (argc < 2 || get_sha1(argv[1], tree_sha1) < 0) + if (argc < 2) usage(commit_tree_usage); + if (get_sha1(argv[1], tree_sha1)) + die("Not a valid object name %s", argv[1]); check_valid(tree_sha1, tree_type); for (i = 2; i < argc; i += 2) { char *a, *b; a = argv[i]; b = argv[i+1]; - if (!b || strcmp(a, "-p") || get_sha1(b, parent_sha1[parents])) + if (!b || strcmp(a, "-p")) usage(commit_tree_usage); + if (get_sha1(b, parent_sha1[parents])) + die("Not a valid object name %s", b); check_valid(parent_sha1[parents], commit_type); if (new_parent(parents)) parents++; |