coccinelle: avoid wrong transformation suggestions from commit.cocci
[gitweb.git] / builtin / tag.c
index 7e0881fba94f6cf399e355320707d80987bade09..7bc499b36e0d8111a843a8ad3f9e96b3fe2bd57b 100644 (file)
@@ -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;
 }