submodule-config: move submodule-config functions to submodule-config.c
[gitweb.git] / builtin / verify-tag.c
index 5199553d914f266315ffc3f170ef95a2a7f621ff..ed8329340f73482c18b295a2733fcb11c4198859 100644 (file)
@@ -6,6 +6,7 @@
  * Based on git-verify-tag.sh
  */
 #include "cache.h"
+#include "config.h"
 #include "builtin.h"
 #include "tag.h"
 #include "run-command.h"
@@ -55,20 +56,21 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
        }
 
        while (i < argc) {
-               unsigned char sha1[20];
+               struct object_id oid;
                const char *name = argv[i++];
-               if (get_sha1(name, sha1)) {
+
+               if (get_oid(name, &oid)) {
                        had_error = !!error("tag '%s' not found.", name);
                        continue;
                }
 
-               if (gpg_verify_tag(sha1, name, flags)) {
+               if (gpg_verify_tag(&oid, name, flags)) {
                        had_error = 1;
                        continue;
                }
 
                if (fmt_pretty)
-                       pretty_print_ref(name, sha1, fmt_pretty);
+                       pretty_print_ref(name, oid.hash, fmt_pretty);
        }
        return had_error;
 }