From: Ian Jackson Date: Thu, 19 Nov 2015 01:10:23 +0000 (+0000) Subject: Split brain: Break out $git_authline_re X-Git-Tag: archive/debian/2.0~315 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=e12f82b7b0d83488293f33fa3aa445744ba7d031;ds=sidebyside 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. --- diff --git a/dgit b/dgit index 7b9aa52d..e30a7889 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;