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>
This commit is contained in:
committed by
Junio C Hamano
parent
bbca96d579
commit
a09c985eae
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user