X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=a0802eb6915a0657207e8f73545a7ff01e1deb37;hp=1f3179f65d1d0aea36b4dc47896475cdd6d908f5;hb=306828d91540e9ce11cafc701d7021845610d14b;hpb=f559074ff68c29e0c40f544ac57e09fe5ade766d;ds=sidebyside diff --git a/dgit b/dgit index 1f3179f6..a0802eb6 100755 --- a/dgit +++ b/dgit @@ -2799,6 +2799,11 @@ sub fetch_from_archive_record_2 ($) { } } +sub parse_dsc_field_def_dsc_distro () { + $dsc_distro //= cfg qw(dgit.default.old-dsc-distro + dgit.default.distro); +} + sub parse_dsc_field ($$) { my ($dsc, $what) = @_; my $f; @@ -2807,21 +2812,16 @@ sub parse_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"; - $def_dsc_distro->(); + parse_dsc_field_def_dsc_distro(); } elsif (($dsc_hash, $dsc_distro, $dsc_hint_tag, $dsc_hint_url) = $f =~ m/^(\w+)\s+($distro_re)\s+($versiontag_re)\s+(\S+)(?:\s|$)/) { progress "$what: specified git info ($dsc_distro)"; $dsc_hint_tag = [ $dsc_hint_tag ]; } elsif ($f =~ m/^\w+\s*$/) { $dsc_hash = $&; - $def_dsc_distro->(); + parse_dsc_field_def_dsc_distro(); $dsc_hint_tag = [ debiantags +(getfield $dsc, 'Version'), $dsc_distro ]; progress "$what: specified git hash";