X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=5ca4a817aa1ddf47c52ace3f2e36f12ae5b53391;hp=68ab4b0d44f6e4346f9af4c0b5560f8cc78b5961;hb=87e828d271c0f37bb33ca723fa991d6afc3ec76f;hpb=8e4a69d54bb811aabe6eb2b133d142771c30f997;ds=sidebyside diff --git a/dgit b/dgit index 68ab4b0d..5ca4a817 100755 --- a/dgit +++ b/dgit @@ -2806,6 +2806,12 @@ sub parse_dsc_field ($$) { $f = $dsc->{$field}; last if defined $f; } + + my $def_dsc_distro = sub { + $dsc_distro //= cfg qw(dgit.default.old-dsc-distro + dgit.default.distro); + }; + if (!defined $f) { progress "$what: NO git hash"; } elsif (($dsc_hash, $dsc_distro, $dsc_hint_tag, $dsc_hint_url) @@ -2814,8 +2820,7 @@ sub parse_dsc_field ($$) { $dsc_hint_tag = [ $dsc_hint_tag ]; } elsif ($f =~ m/^\w+\s*$/) { $dsc_hash = $&; - $dsc_distro //= cfg qw(dgit.default.old-dsc-distro - dgit.default.distro); + $def_dsc_distro->(); $dsc_hint_tag = [ debiantags +(getfield $dsc, 'Version'), $dsc_distro ]; progress "$what: specified git hash";