coccinelle: avoid wrong transformation suggestions from commit.cocci
[gitweb.git] / builtin / tag.c
index a7e6a5b0f234a95fb45a71d7e9aa7f0baa2b47f8..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;
 }
@@ -220,7 +220,7 @@ static void create_tag(const struct object_id *object, const char *tag,
                    "tag %s\n"
                    "tagger %s\n\n",
                    oid_to_hex(object),
-                   typename(type),
+                   type_name(type),
                    tag,
                    git_committer_info(IDENT_STRICT));