if (S_ISDIR(entry.mode)) {
struct tree *t = lookup_tree(ctx->revs->repo, &entry.oid);
+ if (!t) {
+ die(_("entry '%s' in tree %s has tree mode, "
+ "but is not a tree"),
+ entry.path, oid_to_hex(&tree->object.oid));
+ }
t->object.flags |= NOT_USER_GIVEN;
process_tree(ctx, t, base, entry.path);
}
struct tree *tree = get_commit_tree(commit);
tree->object.flags |= NOT_USER_GIVEN;
add_pending_tree(ctx->revs, tree);
+ } else if (commit->object.parsed) {
+ die(_("unable to load root tree for commit %s"),
+ oid_to_hex(&commit->object.oid));
}
ctx->show_commit(commit, ctx->show_data);