chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git fetching: Tidy up a redundant list in git_lrfetch_sane
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 2427f72c06119acd0c3a01b939941f5d825cebcb..845edd3aa22878a3571116c59d37a743fba4ea8f 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-659,7
+659,9
@@
sub git_get_config ($) {
my ($c) = @_;
foreach my $src (@gitcfgsources) {
my $l = $gitcfgs{$src}{$c};
my ($c) = @_;
foreach my $src (@gitcfgsources) {
my $l = $gitcfgs{$src}{$c};
- printdebug"C $c ".(defined $l ? messagequote "'$l'" : "undef")."\n"
+ printdebug"C $c ".(defined $l ?
+ join " ", map { messagequote "'$_'" } @$l :
+ "undef")."\n"
if $debuglevel >= 4;
$l or next;
@$l==1 or badcfg "multiple values for $c".
if $debuglevel >= 4;
$l or next;
@$l==1 or badcfg "multiple values for $c".
@@
-675,7
+677,10
@@
sub cfg {
my $v = git_get_config($c);
return $v if defined $v;
my $dv = $defcfg{$c};
my $v = git_get_config($c);
return $v if defined $v;
my $dv = $defcfg{$c};
- return $dv if defined $dv;
+ if (defined $dv) {
+ printdebug "CD $c $dv\n" if $debuglevel >= 4;
+ return $dv;
+ }
}
badcfg "need value for one of: @_\n".
"$us: distro or suite appears not to be (properly) supported";
}
badcfg "need value for one of: @_\n".
"$us: distro or suite appears not to be (properly) supported";
@@
-2534,7
+2539,7
@@
sub git_lrfetch_sane {
# git fetch to try to generate it. If we don't manage to generate
# the target state, we try again.
# git fetch to try to generate it. If we don't manage to generate
# the target state, we try again.
- printdebug "git_
fetch_us
specs @specs\n";
+ printdebug "git_
lrfetch_sane
specs @specs\n";
my $specre = join '|', map {
my $x = $_;
my $specre = join '|', map {
my $x = $_;
@@
-2542,7
+2547,7
@@
sub git_lrfetch_sane {
$x =~ s/\\\*$/.*/;
"(?:refs/$x)";
} @specs;
$x =~ s/\\\*$/.*/;
"(?:refs/$x)";
} @specs;
- printdebug "git_
fetch_us
specre=$specre\n";
+ printdebug "git_
lrfetch_sane
specre=$specre\n";
my $wanted_rref = sub {
local ($_) = @_;
return m/^(?:$specre)$/o;
my $wanted_rref = sub {
local ($_) = @_;
return m/^(?:$specre)$/o;
@@
-2551,7
+2556,7
@@
sub git_lrfetch_sane {
my $fetch_iteration = 0;
FETCH_ITERATION:
for (;;) {
my $fetch_iteration = 0;
FETCH_ITERATION:
for (;;) {
- printdebug "git_
fetch_us
iteration $fetch_iteration\n";
+ printdebug "git_
lrfetch_sane
iteration $fetch_iteration\n";
if (++$fetch_iteration > 10) {
fail "too many iterations trying to get sane fetch!";
}
if (++$fetch_iteration > 10) {
fail "too many iterations trying to get sane fetch!";
}
@@
-2583,11
+2588,10
@@
END
"+refs/$_:".lrfetchrefs."/$_";
} @specs;
"+refs/$_:".lrfetchrefs."/$_";
} @specs;
- printdebug "git_
fetch_us
fspecs @fspecs\n";
+ printdebug "git_
lrfetch_sane
fspecs @fspecs\n";
my @fcmd = (@git, qw(fetch -p -n -q), access_giturl(), @fspecs);
my @fcmd = (@git, qw(fetch -p -n -q), access_giturl(), @fspecs);
- runcmd_ordryrun_local @git, qw(fetch -p -n -q), access_giturl(),
- @fspecs;
+ runcmd_ordryrun_local @fcmd if @fspecs;
%lrfetchrefs_f = ();
my %objgot;
%lrfetchrefs_f = ();
my %objgot;
@@
-2639,7
+2643,7
@@
END
}
last;
}
}
last;
}
- printdebug "git_
fetch_us
: git fetch --no-insane emulation complete\n",
+ printdebug "git_
lrfetch_sane
: git fetch --no-insane emulation complete\n",
Dumper(\%lrfetchrefs_f);
}
Dumper(\%lrfetchrefs_f);
}