diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 02:27:52 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 09:23:50 -0700 |
commit | 02f0547eaaeeec3446b77a29593f9233cf94d626 (patch) | |
tree | 286f46ad2d534800155bf94a4c2bddb455fcac35 /fast-import.c | |
parent | 916bc35b29af6e0f4f215dea9c84e4185de0fec4 (diff) | |
download | git-02f0547eaaeeec3446b77a29593f9233cf94d626.tar.gz |
sha1_file: convert read_object_with_reference to object_id
Convert read_object_with_reference to take pointers to struct object_id.
Update the internals of the function accordingly.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fast-import.c b/fast-import.c index af3a211ec3..dc63af1eb6 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2583,8 +2583,9 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa oidcpy(&commit_oid, &commit_oe->idx.oid); } else if (!get_oid(p, &commit_oid)) { unsigned long size; - char *buf = read_object_with_reference(commit_oid.hash, - commit_type, &size, commit_oid.hash); + char *buf = read_object_with_reference(&commit_oid, + commit_type, &size, + &commit_oid); if (!buf || size < 46) die("Not a valid commit: %s", p); free(buf); @@ -2653,9 +2654,8 @@ static void parse_from_existing(struct branch *b) unsigned long size; char *buf; - buf = read_object_with_reference(b->oid.hash, - commit_type, &size, - b->oid.hash); + buf = read_object_with_reference(&b->oid, commit_type, &size, + &b->oid); parse_from_commit(b, buf, size); free(buf); } @@ -2732,8 +2732,9 @@ static struct hash_list *parse_merge(unsigned int *count) oidcpy(&n->oid, &oe->idx.oid); } else if (!get_oid(from, &n->oid)) { unsigned long size; - char *buf = read_object_with_reference(n->oid.hash, - commit_type, &size, n->oid.hash); + char *buf = read_object_with_reference(&n->oid, + commit_type, + &size, &n->oid); if (!buf || size < 46) die("Not a valid commit: %s", from); free(buf); |