summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorLibravatar Patryk Obara <patryk.obara@gmail.com>2018-01-28 01:13:19 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-01-30 10:42:36 -0800
commita09c985eae694db1cf31c72db0e2e1bf42f1274f (patch)
tree3acdfc26ab59d2ac822e4b4cf6ad93bf746fb65d /builtin/tag.c
parentnotes: convert write_notes_tree to object_id (diff)
downloadtgif-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 'builtin/tag.c')
-rw-r--r--builtin/tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index a7e6a5b0f2..8885e21ddc 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -187,7 +187,7 @@ static int build_tag_object(struct strbuf *buf, int sign, struct object_id *resu
{
if (sign && do_sign(buf) < 0)
return error(_("unable to sign the tag"));
- if (write_sha1_file(buf->buf, buf->len, tag_type, result->hash) < 0)
+ if (write_object_file(buf->buf, buf->len, tag_type, result) < 0)
return error(_("unable to write tag file"));
return 0;
}