chiark / gitweb /
Split brain: Break out $git_authline_re
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 7b9aa52d2e39453924f6d2df84a90554e912e7f2..e30a7889fa014710e8436af7e0d0bddaa9f60702 100755 (executable)
--- 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 $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);
 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";
     $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;
        fail "unexpected commit author line format \`$authline'".
        " (was generated from changelog Maintainer field)";
     return $authline;