diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-20 03:16:49 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-20 03:19:06 +0300 |
commit | ef1cc2cc216b37c33f1f5d68e770404c435fe1f3 (patch) | |
tree | edd4550ff5f3ad404c0f2d6d6beb33e3d71af4c1 | |
parent | 42f4570c86c41c5bfdc72465afc8f1928da69eea (diff) |
rev-list --objects: fix object list without commit.
Earlier, "rev-list --objects <sha1>" for an object chain that
does not have any commit failed with a usage message. This
fixes "send-pack remote $tag" where tag points at a non-commit
(e.g. a blob).
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | rev-list.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rev-list.c b/rev-list.c index 8020d974f2..d0609666a1 100644 --- a/rev-list.c +++ b/rev-list.c @@ -850,7 +850,8 @@ int main(int argc, const char **argv) handle_one_commit(commit, &list); } - if (!list) + if (!list && + (!(tag_objects||tree_objects||blob_objects) && !pending_objects)) usage(rev_list_usage); paths = get_pathspec(prefix, argv + i); |