refs/files-backend: convert struct ref_to_prune to object_id

Change the member of this struct to be a struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Oct 15, 2017 at 22:06 UTC 49e9958869670d829edd63a54dabc46496a3cb48
1 file changed +3 -3
refs/files-backend.c
+3 -3
@@ -926,7 +926,7 @@ static struct ref_lock *lock_ref_sha1_basic(struct files_ref_store *refs,
926
927 struct ref_to_prune {
928 struct ref_to_prune *next;
929 - unsigned char sha1[20];
929 + struct object_id oid;
930 char name[FLEX_ARRAY];
931 };
932
@@ -994,7 +994,7 @@ static void prune_ref(struct files_ref_store *refs, struct ref_to_prune *r)
994
995 transaction = ref_store_transaction_begin(&refs->base, &err);
996 if (!transaction ||
997 - ref_transaction_delete(transaction, r->name, r->sha1,
997 + ref_transaction_delete(transaction, r->name, r->oid.hash,
998 REF_ISPRUNING | REF_NODEREF, NULL, &err) ||
999 ref_transaction_commit(transaction, &err)) {
1000 ref_transaction_free(transaction);
@@ -1088,7 +1088,7 @@ static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
1088 if ((flags & PACK_REFS_PRUNE)) {
1089 struct ref_to_prune *n;
1090 FLEX_ALLOC_STR(n, name, iter->refname);
1091 - hashcpy(n->sha1, iter->oid->hash);
1091 + oidcpy(&n->oid, iter->oid);
1092 n->next = refs_to_prune;
1093 refs_to_prune = n;
1094 }