]> git.ipfire.org Git - thirdparty/git.git/commit
refs: convert struct ref_update to use struct object_id
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 6 May 2017 22:10:23 +0000 (22:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 06:12:58 +0000 (15:12 +0900)
commit984912989d6c4bc4c34bcf4296173ed96b22d272
tree84159f862273f5133ba579be1309e342f4fbdfee
parent9850fe5d95ac14585998e6ebeaf158c976954b1b
refs: convert struct ref_update to use struct object_id

Convert struct ref_array_item to use struct object_id by changing the
definition and applying the following semantic patch, plus the standard
object_id transforms:

@@
struct ref_update E1;
@@
- E1.new_sha1
+ E1.new_oid.hash

@@
struct ref_update *E1;
@@
- E1->new_sha1
+ E1->new_oid.hash

@@
struct ref_update E1;
@@
- E1.old_sha1
+ E1.old_oid.hash

@@
struct ref_update *E1;
@@
- E1->old_sha1
+ E1->old_oid.hash

This transformation allows us to convert write_ref_to_lockfile, which is
required to convert parse_object.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/files-backend.c
refs/refs-internal.h