From e12f82b7b0d83488293f33fa3aa445744ba7d031 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 19 Nov 2015 01:10:23 +0000 Subject: [PATCH] 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. --- dgit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2