Browse Source

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>
maint
Junio C Hamano 19 years ago
parent
commit
ef1cc2cc21
  1. 3
      rev-list.c

3
rev-list.c

@ -850,7 +850,8 @@ int main(int argc, const char **argv) @@ -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);

Loading…
Cancel
Save