chiark / gitweb /
pseudomerge_version_check; Break out $gf
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jan 2017 15:42:00 +0000 (15:42 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jan 2017 15:42:00 +0000 (15:42 +0000)
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 8e7f239..af14e3f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3802,8 +3802,12 @@ sub pseudomerge_version_check ($$) {
            eval {
                my @xa = ("-f$v", "-t$v");
                my $vclogp = parsechangelog @xa;
-               my $cv = [ (getfield $vclogp, 'Version'),
-                          "Version field from dpkg-parsechangelog @xa" ];
+               my $gf = sub {
+                   my ($fn) = @_;
+                   [ (getfield $vclogp, $fn),
+                     "$fn field from dpkg-parsechangelog @xa" ];
+               };
+               my $cv = $gf->('Version');
                infopair_cond_equal($i_arch_v, $cv);
            };
            if ($@) {