summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-11-19 01:10:23 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-16 16:47:47 +0100
commite12f82b7b0d83488293f33fa3aa445744ba7d031 (patch)
treeb897178da8954ee21bd3f46b7958625afe0703a3 /dgit
parentb83b6f62fc7c4b473c7228b1293619389b284c5f (diff)
Split brain: Break out $git_authline_re
This will make it a bit easier to reuse it. Actually AFAICT it turns out (looking at the rest of the branch) that this is not needed, but it's nicer for the future I think.
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit4
1 files changed, 3 insertions, 1 deletions
diff --git a/dgit b/dgit
index 7b9aa52..e30a788 100755
--- a/dgit
+++ b/dgit
@@ -70,6 +70,8 @@ our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
our $suite_re = '[-+.0-9a-z]+';
our $cleanmode_re = 'dpkg-source(?:-d)?|git|git-ff|check|none';
+our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
+
our (@git) = qw(git);
our (@dget) = qw(dget);
our (@curl) = qw(curl -f);
@@ -1316,7 +1318,7 @@ sub clogp_authline ($) {
$author =~ s#,.*##ms;
my $date = cmdoutput qw(date), '+%s %z', qw(-d), getfield($clogp,'Date');
my $authline = "$author $date";
- $authline =~ m/^[^<>]+ \<\S+\> \d+ [-+]\d+$/ or
+ $authline =~ m/$git_authline_re/o or
fail "unexpected commit author line format \`$authline'".
" (was generated from changelog Maintainer field)";
return $authline;