chiark / gitweb /
nickname is optional in patch specs
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Jan 2012 23:25:14 +0000 (23:25 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Jan 2012 23:25:33 +0000 (23:25 +0000)
FORMAT
TERMINOLOGY
Topbloke.pm
tb-create.pl

diff --git a/FORMAT b/FORMAT
index b755f249aac3d43a1dbcf6ad94c0a82d5fdf3f9f..e411d3875fa978e7908561a3f02ff23bce2ccd4b 100644 (file)
--- a/FORMAT
+++ b/FORMAT
@@ -46,7 +46,7 @@ eg
 NB only exactly that date format is allowed and timezone must be Z.
 
 Patches may be specified as
-       [<qualifier>/...]<nickname-path-spec>
+       [<qualifier>/...][<nickname-path-spec>]
 where <qualifier>/ is one of
        [<email>]@[<domain.name>/
                Only patches matching the specified email local part
index bccdf4552429c776eb42896e81a0c8acdcc5b209..6d7bffdb3baf81f37f35bc2a472e49b7be2eb033 100644 (file)
@@ -10,3 +10,5 @@ branch
        any git branch including one of the two branches for a patch
 foreign branch
        any non-topbloke-controlled branch
+nick
+       final component of a branch name
index d33d87f7dc77f8cbddb5f1ed23c8dc19cb749cde..b469f26ba5c3341476722f8e19d488c66dd093eb 100644 (file)
@@ -199,8 +199,9 @@ sub parse_patch_spec ($) {
        @l >= $rel_levels or
            die "relative patch spec \`$orig' has too many ../s\n";
        $_ = (join '/', @l[0..$#l-$rel_levels]).'/'.$_;
+    } elsif (length) {
+       $spec->{Nick} = $_;
     }
-    $spec->{Nick} = $_;
     return $spec;
 }
 
index 16954d4c09bacea7210817b5808c76917137fdc1..a3fd1b37e6c86d23288d19ee84616eece18a8692 100755 (executable)
@@ -40,6 +40,8 @@ if (!defined $spec->{Date}) {
     chomp $spec->{Date} or die $!;
 }
 
+defined $spec->{Nick} or die "no patch nickname specified\n";
+
 length($spec->{Date})==18 or die "partial date specified, not supported\n";
 
 chdir_toplevel();