chiark / gitweb /
infra: Provide get-dm-txt
[dgit.git] / dgit-repos-server
index add54245a665dda3601c8d79bcf932e30cecc7cf..c70bc27fd13b8a7d50ea3d25dba2bd9a7588f3ef 100755 (executable)
@@ -456,17 +456,17 @@ sub checksuite () {
 sub tagh1 ($) {
     my ($tag) = @_;
     my $vals = $tagh{$tag};
-    reject "missing tag $tag in signed tag object" unless $vals;
-    reject "multiple tags $tag in signed tag object" unless @$vals == 1;
+    reject "missing header $tag in signed tag object" unless $vals;
+    reject "multiple headers $tag in signed tag object" unless @$vals == 1;
     return $vals->[0];
 }
 
 sub checks () {
     debug "checks";
     checksuite();
-    tagh1('type') eq 'commit' or die;
-    tagh1('object') eq $commit or die;
-    tagh1('tag') eq $tagname or die;
+    tagh1('type') eq 'commit' or reject "tag refers to wrong kind of object";
+    tagh1('object') eq $commit or reject "tag refers to wrong commit";
+    tagh1('tag') eq $tagname or reject "tag name in tag is wrong";
 
     my $v = $version;
     $v =~ y/~:/_%/;
@@ -576,9 +576,9 @@ sub parseargsdispatch () {
        (?: \S* / )?
        ( [-0-9a-z]+ )
        \s+
-       (?: \S* / )?
+       '? (?: \S* / )?
        ($package_re) \.git
-       $
+       '?$
     }ox 
     or reject "command string not understood";
     my $method = $1;