chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit: parse_dsc_field: Break out $def_dsc_distro
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index fabf83bb8d96002f11c31f79f86918f592750f92..5ca4a817aa1ddf47c52ace3f2e36f12ae5b53391 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-2763,8
+2763,8
@@
sub git_fetch_us () {
} elsif ($here{$lref} eq $objid) {
lrfetchref_used $fullrefname;
} else {
} elsif ($here{$lref} eq $objid) {
lrfetchref_used $fullrefname;
} else {
- print STDERR
\
- "Not updat
et
ing $lref from $here{$lref} to $objid.\n";
+ print STDERR
+ "Not updating $lref from $here{$lref} to $objid.\n";
}
});
}
}
});
}
@@
-2806,6
+2806,12
@@
sub parse_dsc_field ($$) {
$f = $dsc->{$field};
last if defined $f;
}
$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)
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_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";
$dsc_hint_tag = [ debiantags +(getfield $dsc, 'Version'),
$dsc_distro ];
progress "$what: specified git hash";
@@
-2911,7
+2916,7
@@
but we could not obtain that object anywhere.
END
foreach my $t (@tags) {
my $fullrefname = $lrf.'/'.$t;
END
foreach my $t (@tags) {
my $fullrefname = $lrf.'/'.$t;
-
print STDERR "CHK $t $fullrefname ".Dumper(\%lrfetchrefs_f);
+
#
print STDERR "CHK $t $fullrefname ".Dumper(\%lrfetchrefs_f);
next unless $lrfetchrefs_f{$fullrefname};
next unless is_fast_fwd "$fullrefname~0", $dsc_hash;
lrfetchref_used $fullrefname;
next unless $lrfetchrefs_f{$fullrefname};
next unless is_fast_fwd "$fullrefname~0", $dsc_hash;
lrfetchref_used $fullrefname;