diff options
author | Patryk Obara <patryk.obara@gmail.com> | 2018-01-28 01:13:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-30 10:42:36 -0800 |
commit | a09c985eae694db1cf31c72db0e2e1bf42f1274f (patch) | |
tree | 3acdfc26ab59d2ac822e4b4cf6ad93bf746fb65d /merge-recursive.c | |
parent | notes: convert write_notes_tree to object_id (diff) | |
download | tgif-a09c985eae694db1cf31c72db0e2e1bf42f1274f.tar.xz |
sha1_file: convert write_sha1_file to object_id
Convert the definition and declaration of write_sha1_file to
struct object_id and adjust usage of this function.
This commit also converts static function write_sha1_file_prepare, as it
is closely related.
Rename these functions to write_object_file and
write_object_file_prepare respectively.
Replace sha1_to_hex, hashcpy and hashclr with their oid equivalents
wherever possible.
Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index cc5fa0a949..fe3c0c8076 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1009,8 +1009,9 @@ static int merge_file_1(struct merge_options *o, if ((merge_status < 0) || !result_buf.ptr) ret = err(o, _("Failed to execute internal merge")); - if (!ret && write_sha1_file(result_buf.ptr, result_buf.size, - blob_type, result->oid.hash)) + if (!ret && + write_object_file(result_buf.ptr, result_buf.size, + blob_type, &result->oid)) ret = err(o, _("Unable to add %s to database"), a->path); |