From ce98c8fde5cd8e06d2c3cc69f30a7574f8e25b22 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 22 Jan 2012 23:25:14 +0000 Subject: [PATCH] nickname is optional in patch specs --- FORMAT | 2 +- TERMINOLOGY | 2 ++ Topbloke.pm | 3 ++- tb-create.pl | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/FORMAT b/FORMAT index b755f24..e411d38 100644 --- 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 - [/...] + [/...][] where / is one of []@[/ Only patches matching the specified email local part diff --git a/TERMINOLOGY b/TERMINOLOGY index bccdf45..6d7bffd 100644 --- a/TERMINOLOGY +++ b/TERMINOLOGY @@ -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 diff --git a/Topbloke.pm b/Topbloke.pm index d33d87f..b469f26 100644 --- a/Topbloke.pm +++ b/Topbloke.pm @@ -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; } diff --git a/tb-create.pl b/tb-create.pl index 16954d4..a3fd1b3 100755 --- a/tb-create.pl +++ b/tb-create.pl @@ -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(); -- 2.30.2