diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 02:27:46 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 09:23:49 -0700 |
commit | abef9020e3df87c441c9a3a95f592fce5fa49bb9 (patch) | |
tree | b04714a271049de3d7402e20e868beb5cee30995 /builtin/unpack-objects.c | |
parent | Convert remaining callers of sha1_object_info_extended to object_id (diff) | |
download | tgif-abef9020e3df87c441c9a3a95f592fce5fa49bb9.tar.xz |
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 'builtin/unpack-objects.c')
-rw-r--r-- | builtin/unpack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 9f96949bc0..6d553374c0 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -198,7 +198,7 @@ static int check_object(struct object *obj, int type, void *data, struct fsck_op if (!(obj->flags & FLAG_OPEN)) { unsigned long size; - int type = sha1_object_info(obj->oid.hash, &size); + int type = oid_object_info(&obj->oid, &size); if (type != obj->type || type <= 0) die("object of unexpected type"); obj->flags |= FLAG_WRITTEN; |