From: Junio C Hamano Date: Sun, 3 Apr 2011 19:32:35 +0000 (-0700) Subject: Merge branch 'jc/maint-rev-list-culled-boundary' into maint X-Git-Tag: v1.7.4.4~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3967c995eed9f4046a1dde5ef520d1dbcdedfab8?hp=-c Merge branch 'jc/maint-rev-list-culled-boundary' into maint * jc/maint-rev-list-culled-boundary: list-objects.c: don't add an unparsed NULL as a pending tree Conflicts: list-objects.c --- 3967c995eed9f4046a1dde5ef520d1dbcdedfab8 diff --combined list-objects.c index 8953548c07,518c6650e1..44fa5a92e2 --- a/list-objects.c +++ b/list-objects.c @@@ -23,7 -23,7 +23,7 @@@ static void process_blob(struct rev_inf if (obj->flags & (UNINTERESTING | SEEN)) return; obj->flags |= SEEN; - show(obj, path_name(path, name)); + show(obj, path, name); } /* @@@ -77,7 -77,7 +77,7 @@@ static void process_tree(struct rev_inf if (parse_tree(tree) < 0) die("bad tree object %s", sha1_to_hex(obj->sha1)); obj->flags |= SEEN; - show(obj, path_name(path, name)); + show(obj, path, name); me.up = path; me.elem = name; me.elem_len = strlen(name); @@@ -140,16 -140,20 +140,21 @@@ static void add_pending_tree(struct rev } void traverse_commit_list(struct rev_info *revs, - void (*show_commit)(struct commit *), - void (*show_object)(struct object *, const char *)) + show_commit_fn show_commit, + show_object_fn show_object, + void *data) { int i; struct commit *commit; while ((commit = get_revision(revs)) != NULL) { - add_pending_tree(revs, commit->tree); + /* + * an uninteresting boundary commit may not have its tree + * parsed yet, but we are not going to show them anyway + */ + if (commit->tree) + add_pending_tree(revs, commit->tree); - show_commit(commit); + show_commit(commit, data); } for (i = 0; i < revs->pending.nr; i++) { struct object_array_entry *pending = revs->pending.objects + i; @@@ -159,7 -163,7 +164,7 @@@ continue; if (obj->type == OBJ_TAG) { obj->flags |= SEEN; - show_object(obj, name); + show_object(obj, NULL, name); continue; } if (obj->type == OBJ_TREE) {