void mark_tree_uninteresting(struct tree *tree)
{
- struct object *obj = &tree->object;
+ struct object *obj;
if (!tree)
return;
+
+ obj = &tree->object;
if (obj->flags & UNINTERESTING)
return;
obj->flags |= UNINTERESTING;
add_pending_object(revs, object, tag->tag);
if (!tag->tagged)
die("bad tag");
- object = parse_object(get_object_hash(*tag->tagged));
+ object = parse_object(tag->tagged->oid.hash);
if (!object) {
if (flags & UNINTERESTING)
return NULL;
/*
* We'll handle the tagged object by looping or dropping
* through to the non-tag handlers below. Do not
- * propagate data from the tag's pending entry.
+ * propagate path data from the tag's pending entry.
*/
- name = "";
path = NULL;
mode = 0;
}
tree_difference = REV_TREE_SAME;
DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES);
- if (diff_tree_sha1(get_object_hash(t1->object), get_object_hash(t2->object), "",
+ if (diff_tree_sha1(t1->object.oid.hash, t2->object.oid.hash, "",
&revs->pruning) < 0)
return REV_TREE_DIFFERENT;
return tree_difference;
tree_difference = REV_TREE_SAME;
DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES);
- retval = diff_tree_sha1(NULL, get_object_hash(t1->object), "", &revs->pruning);
+ retval = diff_tree_sha1(NULL, t1->object.oid.hash, "", &revs->pruning);
return retval >= 0 && (tree_difference == REV_TREE_SAME);
}
break;
if (!((struct tag*)it)->tagged)
return 0;
- hashcpy(sha1, get_object_hash(*((struct tag*)it)->tagged));
+ hashcpy(sha1, ((struct tag*)it)->tagged->oid.hash);
}
if (it->type != OBJ_COMMIT)
return 0;
a = (a_obj->type == OBJ_COMMIT
? (struct commit *)a_obj
- : lookup_commit_reference(get_object_hash(*a_obj)));
+ : lookup_commit_reference(a_obj->oid.hash));
b = (b_obj->type == OBJ_COMMIT
? (struct commit *)b_obj
- : lookup_commit_reference(get_object_hash(*b_obj)));
+ : lookup_commit_reference(b_obj->oid.hash));
if (!a || !b)
goto missing;
exclude = get_merge_bases(a, b);
if (opt->show_notes) {
if (!buf.len)
strbuf_addstr(&buf, message);
- format_display_notes(get_object_hash(commit->object), &buf, encoding, 1);
+ format_display_notes(commit->object.oid.hash, &buf, encoding, 1);
}
/*
{
if (commit->object.flags & SHOWN)
return commit_ignore;
- if (revs->unpacked && has_sha1_pack(get_object_hash(commit->object)))
+ if (revs->unpacked && has_sha1_pack(commit->object.oid.hash))
return commit_ignore;
if (revs->show_all)
return commit_show;