Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (36 commits) convert: convert to struct object_id sha1_file: introduce a constant for max header length Convert lookup_replace_object to struct object_id sha1_file: convert read_sha1_file to struct object_id sha1_file: convert read_object_with_reference to object_id tree-walk: convert tree entry functions to object_id streaming: convert istream internals to struct object_id tree-walk: convert get_tree_entry_follow_symlinks internals to object_id builtin/notes: convert static functions to object_id builtin/fmt-merge-msg: convert remaining code to object_id sha1_file: convert sha1_object_info* to object_id Convert remaining callers of sha1_object_info_extended to object_id packfile: convert unpack_entry to struct object_id sha1_file: convert retry_bad_packed_offset to struct object_id sha1_file: convert assert_sha1_type to object_id builtin/mktree: convert to struct object_id streaming: convert open_istream to use struct object_id sha1_file: convert check_sha1_signature to struct object_id sha1_file: convert read_loose_object to use struct object_id builtin/index-pack: convert struct ref_delta_entry to object_id ...
This commit is contained in:
6
diff.c
6
diff.c
@ -3638,7 +3638,7 @@ int diff_populate_filespec(struct diff_filespec *s, unsigned int flags)
|
||||
else {
|
||||
enum object_type type;
|
||||
if (size_only || (flags & CHECK_BINARY)) {
|
||||
type = sha1_object_info(s->oid.hash, &s->size);
|
||||
type = oid_object_info(&s->oid, &s->size);
|
||||
if (type < 0)
|
||||
die("unable to read %s",
|
||||
oid_to_hex(&s->oid));
|
||||
@ -3649,7 +3649,7 @@ int diff_populate_filespec(struct diff_filespec *s, unsigned int flags)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
s->data = read_sha1_file(s->oid.hash, &type, &s->size);
|
||||
s->data = read_object_file(&s->oid, &type, &s->size);
|
||||
if (!s->data)
|
||||
die("unable to read %s", oid_to_hex(&s->oid));
|
||||
s->should_free = 1;
|
||||
@ -3834,7 +3834,7 @@ static int similarity_index(struct diff_filepair *p)
|
||||
static const char *diff_abbrev_oid(const struct object_id *oid, int abbrev)
|
||||
{
|
||||
if (startup_info->have_repository)
|
||||
return find_unique_abbrev(oid->hash, abbrev);
|
||||
return find_unique_abbrev(oid, abbrev);
|
||||
else {
|
||||
char *hex = oid_to_hex(oid);
|
||||
if (abbrev < 0)
|
||||
|
||||
Reference in New Issue
Block a user