aboutsummaryrefslogtreecommitdiff
path: root/refs/packed-backend.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:07:11 +0000
committerJunio C Hamano <gitster@pobox.com>2017-10-16 11:05:52 +0900
commit99afe91a6c3a37b7bb32c824f19b1b51712fe6f3 (patch)
tree87613256629ddd8f96d6dfab7089330a04f0353a /refs/packed-backend.c
parentac2ed0d7d51e5c0b402797ecf01f38e9bfc82e0e (diff)
downloadgit-99afe91a6c3a37b7bb32c824f19b1b51712fe6f3.tar.gz
git-99afe91a6c3a37b7bb32c824f19b1b51712fe6f3.tar.xz
refs: convert read_raw_ref backends to struct object_id
Convert the unsigned char * parameter to struct object_id * for files_read_raw_ref and packed_read_raw_ref. Update the documentation. Switch from using get_sha1_hex and a hard-coded 40 to using parse_oid_hex. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r--refs/packed-backend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index b7652738b..74f1dea0f 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -716,7 +716,7 @@ static struct snapshot *get_snapshot(struct packed_ref_store *refs)
}
static int packed_read_raw_ref(struct ref_store *ref_store,
- const char *refname, unsigned char *sha1,
+ const char *refname, struct object_id *oid,
struct strbuf *referent, unsigned int *type)
{
struct packed_ref_store *refs =
@@ -734,7 +734,7 @@ static int packed_read_raw_ref(struct ref_store *ref_store,
return -1;
}
- if (get_sha1_hex(rec, sha1))
+ if (get_oid_hex(rec, oid))
die_invalid_line(refs->path, rec, snapshot->eof - rec);
*type = REF_ISPACKED;