chiark / gitweb /
dgit-repos-server: tag2upload: Better message from upstream mismatch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 6 Jul 2019 17:37:03 +0000 (18:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Jul 2019 10:18:17 +0000 (11:18 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
infra/dgit-repos-server

index f5767ae..65fda22 100755 (executable)
@@ -1260,7 +1260,9 @@ END
     }
     # this is just to get the orig, so we don't really care about the ref
     if (defined $upstreamc) {
-       $upstreamc eq git_rev_parse "refs/tags/$upstreamt" or die;
+       my $need_upstreamc = git_rev_parse "refs/tags/$upstreamt";
+       $upstreamc eq $need_upstreamc or reject
+           "upstream-commitish=$upstreamc but tag refers to $need_upstreamc";
        runcmd qw(git deborig), "$upstreamc";
     }