chiark / gitweb /
dgit-repos-server: tag2upload: Check the upstream tag syntax only once
[dgit.git] / infra / dgit-repos-server
index 811db69dd38021c3cb845ec781f6f8e81903cdfd..f5767aefdeb0fe2f2ee9b24ba74dbdf806bff6e0 100755 (executable)
@@ -1224,15 +1224,15 @@ END
        $distro_ok ||= $gotdistro eq $distro;
     };
 
-    $quit->("other distro") unless $distro_ok;
+    $quit->("not for this distro") unless $distro_ok;
 
     reject "missing \"$_\"" foreach keys %need;
 
+    verifytag();
+
     reject "upstream tag and not commitish, or v-v"
        unless defined $upstreamt == defined $upstreamc;
 
-    verifytag();
-
     my @dgit;
     push @dgit, $ENV{DGIT_DRS_DGIT} // 'dgit';
     push @dgit, '-wn';
@@ -1244,7 +1244,6 @@ END
 
     my @fetch = qw(git fetch origin --unshallow);
     if (defined $upstreamt) {
-       runcmd qw(git check-ref-format), "refs/tags/$upstreamt";
        runcmd qw(git check-ref-format), "refs/tags/$upstreamt";
        my $utagref = "refs/tags/$upstreamt";
        push @fetch, "$utagref:$utagref";