Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 05:27:46 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-14 19:23:49 +0300
commitabef9020e3df87c441c9a3a95f592fce5fa49bb9 (patch)
treeb04714a271049de3d7402e20e868beb5cee30995 /refs.c
parent7984f23833d1c1b8d7d5d863ed8c42b67e0a0fba (diff)
sha1_file: convert sha1_object_info* to object_id
Convert sha1_object_info and sha1_object_info_extended to take pointers to struct object_id and rename them to use "oid" instead of "sha1" in their names. Update the declaration and definition and apply the following semantic patch, plus the standard object_id transforms: @@ expression E1, E2; @@ - sha1_object_info(E1.hash, E2) + oid_object_info(&E1, E2) @@ expression E1, E2; @@ - sha1_object_info(E1->hash, E2) + oid_object_info(E1, E2) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1.hash, E2, E3) + oid_object_info_extended(&E1, E2, E3) @@ expression E1, E2, E3; @@ - sha1_object_info_extended(E1->hash, E2, E3) + oid_object_info_extended(E1, E2, E3) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 20ba82b434..8b7a77fe5e 100644
--- a/refs.c
+++ b/refs.c
@@ -301,7 +301,7 @@ enum peel_status peel_object(const struct object_id *name, struct object_id *oid
struct object *o = lookup_unknown_object(name->hash);
if (o->type == OBJ_NONE) {
- int type = sha1_object_info(name->hash, NULL);
+ int type = oid_object_info(name, NULL);
if (type < 0 || !object_as_type(o, type, 0))
return PEEL_INVALID;
}