refs: convert read_ref and read_ref_full to object_id
All but two of the call sites already have parameters using the hash parameter of struct object_id, so convert them to take a pointer to the struct directly. Also convert refs_read_refs_full, the underlying implementation. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0f2dc722dd
commit
34c290a6fc
@ -18,7 +18,7 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
|
||||
if (!parents) {
|
||||
/* Deduce parent commit from t->ref */
|
||||
struct object_id parent_oid;
|
||||
if (!read_ref(t->ref, parent_oid.hash)) {
|
||||
if (!read_ref(t->ref, &parent_oid)) {
|
||||
struct commit *parent = lookup_commit(&parent_oid);
|
||||
if (parse_commit(parent))
|
||||
die("Failed to find/parse commit %s", t->ref);
|
||||
|
||||
Reference in New Issue
Block a user