Convert struct ref to use object_id.
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 4a6b340..19215b3 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -17,7 +17,7 @@
unsigned char sha1[20];
if (namelen > 41 && name[40] == ' ' && !get_sha1_hex(name, sha1)) {
- hashcpy(ref->old_sha1, sha1);
+ hashcpy(ref->old_oid.hash, sha1);
name += 41;
namelen -= 41;
}
@@ -210,7 +210,7 @@
while (ref) {
printf("%s %s\n",
- sha1_to_hex(ref->old_sha1), ref->name);
+ oid_to_hex(&ref->old_oid), ref->name);
ref = ref->next;
}