sha1_file: convert read_object_with_reference to object_id
Convert read_object_with_reference to take pointers to struct object_id. Update the internals of the function accordingly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
916bc35b29
commit
02f0547eaa
@ -159,7 +159,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
|
||||
* fall-back to the usual case.
|
||||
*/
|
||||
}
|
||||
buf = read_object_with_reference(oid.hash, exp_type, &size, NULL);
|
||||
buf = read_object_with_reference(&oid, exp_type, &size, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -452,7 +452,7 @@ static int grep_submodule(struct grep_opt *opt, struct repository *superproject,
|
||||
object = parse_object_or_die(oid, oid_to_hex(oid));
|
||||
|
||||
grep_read_lock();
|
||||
data = read_object_with_reference(object->oid.hash, tree_type,
|
||||
data = read_object_with_reference(&object->oid, tree_type,
|
||||
&size, NULL);
|
||||
grep_read_unlock();
|
||||
|
||||
@ -614,7 +614,7 @@ static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
|
||||
int hit, len;
|
||||
|
||||
grep_read_lock();
|
||||
data = read_object_with_reference(obj->oid.hash, tree_type,
|
||||
data = read_object_with_reference(&obj->oid, tree_type,
|
||||
&size, NULL);
|
||||
grep_read_unlock();
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ static void add_preferred_base(struct object_id *oid)
|
||||
if (window <= num_preferred_base++)
|
||||
return;
|
||||
|
||||
data = read_object_with_reference(oid->hash, tree_type, &size, tree_oid.hash);
|
||||
data = read_object_with_reference(oid, tree_type, &size, &tree_oid);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user