diff --git a/builtin-tag.c b/builtin-tag.c
index 2cdefb1d9a11968ea177f29b9a1334ef5f1d67eb..a3984998915921476a80839a07b133779ece72f3 100644 (file)
--- a/builtin-tag.c
+++ b/builtin-tag.c
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;
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.");