]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-tag.c
Merge branch 'maint'
[git.git] / builtin-tag.c
index f2853d08c77368b37b40c7ea51f5a124208d385f..b13fa34d8c59a9226599ba10b4d679f41ad230b0 100644 (file)
@@ -338,7 +338,7 @@ static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
 
 int cmd_tag(int argc, const char **argv, const char *prefix)
 {
-       struct strbuf buf;
+       struct strbuf buf = STRBUF_INIT;
        unsigned char object[20], prev[20];
        char ref[PATH_MAX];
        const char *object_ref, *tag;
@@ -388,7 +388,6 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
        if (verify)
                return for_each_tag_name(argv, verify_tag);
 
-       strbuf_init(&buf, 0);
        if (msg.given || msgfile) {
                if (msg.given && msgfile)
                        die("only one -F or -m option is allowed.");