cache: convert struct cache_entry to use struct object_id

Convert struct cache_entry to use struct object_id by applying the
following semantic patch and the object_id transforms from contrib, plus
the actual change to the struct:

@@
struct cache_entry E1;
@@
- E1.sha1
+ E1.oid.hash

@@
struct cache_entry *E1;
@@
- E1->sha1
+ E1->oid.hash

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2016-09-05 20:07:52 +00:00
committed by Junio C Hamano
parent 6ebdac1bab
commit 99d1a9861a
26 changed files with 79 additions and 69 deletions

View File

@ -722,7 +722,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
mode = active_cache[i]->ce_mode;
if (S_ISGITLINK(mode))
continue;
blob = lookup_blob(active_cache[i]->sha1);
blob = lookup_blob(active_cache[i]->oid.hash);
if (!blob)
continue;
obj = &blob->object;