git-show-branch doc: show -g as synonym to --reflog in the list
[gitweb.git] / mktag.c
diff --git a/mktag.c b/mktag.c
index 0b34341f711a903d4a12fe96dc6ef63e55fb2f5b..6d5083eaf04b9ad1b54dad5eaca33d9a73373bbd 100644 (file)
--- a/mktag.c
+++ b/mktag.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "tag.h"
+#include "exec_cmd.h"
 
 /*
  * A signature file has a very simple fixed format: four lines
@@ -153,15 +154,16 @@ static int verify_tag(char *buffer, unsigned long size)
 
 int main(int argc, char **argv)
 {
-       struct strbuf buf;
+       struct strbuf buf = STRBUF_INIT;
        unsigned char result_sha1[20];
 
        if (argc != 1)
                usage("git-mktag < signaturefile");
 
+       git_extract_argv0_path(argv[0]);
+
        setup_git_directory();
 
-       strbuf_init(&buf, 0);
        if (strbuf_read(&buf, 0, 4096) < 0) {
                die("could not read from stdin");
        }