chiark / gitweb /
dgit: Break out @files_csum_info_fields (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Oct 2016 12:56:00 +0000 (13:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Oct 2016 00:01:11 +0000 (01:01 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 34152eec985ae6aeb36b1b259a2498262025887d..ae1e6b5724a4ee5cbdaa16987345dc5156c64927 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1414,10 +1414,13 @@ sub mktree_in_ud_from_only_subdir (;$) {
     return ($tree,$dir);
 }
 
+our @files_csum_info_fields = 
+    (['Checksums-Sha256','Digest::SHA', 'new(256)'],
+     ['Checksums-Sha1',  'Digest::SHA', 'new(1)'],
+     ['Files',           'Digest::MD5', 'new()']);
+
 sub dsc_files_info () {
-    foreach my $csumi (['Checksums-Sha256','Digest::SHA', 'new(256)'],
-                      ['Checksums-Sha1',  'Digest::SHA', 'new(1)'],
-                      ['Files',           'Digest::MD5', 'new()']) {
+    foreach my $csumi (@files_csum_info_fields) {
        my ($fname, $module, $method) = @$csumi;
        my $field = $dsc->{$fname};
        next unless defined $field;