get_object_mark(&commit->parents->item->object) != 0 &&
!full_tree) {
parse_commit_or_die(commit->parents->item);
- diff_tree_sha1(get_object_hash(commit->parents->item->tree->object),
- get_object_hash(commit->tree->object), "", &rev->diffopt);
+ diff_tree_sha1(commit->parents->item->tree->object.oid.hash,
+ commit->tree->object.oid.hash, "", &rev->diffopt);
}
else
- diff_root_tree_sha1(get_object_hash(commit->tree->object),
+ diff_root_tree_sha1(commit->tree->object.oid.hash,
"", &rev->diffopt);
/* Export the referenced blobs, and remember the marks. */
return;
}
- buf = read_sha1_file(get_object_hash(tag->object), &type, &size);
+ buf = read_sha1_file(tag->object.oid.hash, &type, &size);
if (!buf)
die ("Could not read tag %s", oid_to_hex(&tag->object.oid));
message = memmem(buf, size, "\n\n", 2);
/* handle nested tags */
while (tag && tag->object.type == OBJ_TAG) {
- parse_object(get_object_hash(tag->object));
+ parse_object(tag->object.oid.hash);
string_list_append(&extra_refs, full_name)->util = tag;
tag = (struct tag *)tag->tagged;
}
case OBJ_COMMIT:
break;
case OBJ_BLOB:
- export_blob(get_object_hash(commit->object));
+ export_blob(commit->object.oid.hash);
continue;
default: /* OBJ_TAG (nested tags) is already handled */
warning("Tag points to object of unexpected type %s, skipping.",
FILE *f;
int e = 0;
- f = fopen(file, "w");
+ f = fopen_for_writing(file);
if (!f)
die_errno("Unable to open marks file %s for writing.", file);