From: Junio C Hamano Date: Tue, 20 Dec 2005 00:16:49 +0000 (-0800) Subject: rev-list --objects: fix object list without commit. X-Git-Tag: v1.0.0^2~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef1cc2cc216b37c33f1f5d68e770404c435fe1f3;p=git.git rev-list --objects: fix object list without commit. Earlier, "rev-list --objects " 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 --- diff --git a/rev-list.c b/rev-list.c index 8020d974f..d0609666a 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);