1. Stefan Saasen
  2. git


Junio C Hamano  committed ef1cc2c

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>

  • Participants
  • Parent commits 42f4570
  • Branches master

Comments (0)

Files changed (1)

File rev-list.c

View file
  • Ignore whitespace
 		handle_one_commit(commit, &list);
-	if (!list)
+	if (!list &&
+	    (!(tag_objects||tree_objects||blob_objects) && !pending_objects))
 	paths = get_pathspec(prefix, argv + i);