X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-tag.c;h=84db156e63681de6322019b9b9ffa15371c443b1;hb=bc9c0248a5cf184756ba562d6c452cace8863517;hp=843e9ac056c88bb2c9a8c6ded464096a99f13aff;hpb=2819854ec5013fc0958ea477fa49d53fc0faee80;p=git.git diff --git a/builtin-tag.c b/builtin-tag.c index 843e9ac05..84db156e6 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -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.");