summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-08 00:50:02 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-08 22:14:48 +0000
commit18c4fddd4c69c6c2bf225ded6c5cc2ff060e96b6 (patch)
tree2e841e5dbe70b45a479740bfb07ee7663e4cbb1d /dgit
parent8d39b62c354c9e80b23274aab6d60b9e0546b536 (diff)
git fetching: Break out git_lrfetch_sane
No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit32
1 files changed, 19 insertions, 13 deletions
diff --git a/dgit b/dgit
index 933c008..dc31ce1 100755
--- a/dgit
+++ b/dgit
@@ -2507,19 +2507,8 @@ sub ensure_we_have_orig () {
}
}
-sub git_fetch_us () {
- # Want to fetch only what we are going to use, unless
- # deliberately-not-ff, in which case we must fetch everything.
-
- my @specs = deliberately_not_fast_forward ? qw(tags/*) :
- map { "tags/$_" }
- (quiltmode_splitbrain
- ? (map { $_->('*',access_nomdistro) }
- \&debiantag_new, \&debiantag_maintview)
- : debiantags('*',access_nomdistro));
- push @specs, server_branch($csuite);
- push @specs, $rewritemap;
- push @specs, qw(heads/*) if deliberately_not_fast_forward;
+sub git_lrfetch_sane {
+ my (@specs) = @_;
# This is rather miserable:
# When git fetch --prune is passed a fetchspec ending with a *,
@@ -2650,6 +2639,23 @@ END
}
printdebug "git_fetch_us: git fetch --no-insane emulation complete\n",
Dumper(\%lrfetchrefs_f);
+}
+
+sub git_fetch_us () {
+ # Want to fetch only what we are going to use, unless
+ # deliberately-not-ff, in which case we must fetch everything.
+
+ my @specs = deliberately_not_fast_forward ? qw(tags/*) :
+ map { "tags/$_" }
+ (quiltmode_splitbrain
+ ? (map { $_->('*',access_nomdistro) }
+ \&debiantag_new, \&debiantag_maintview)
+ : debiantags('*',access_nomdistro));
+ push @specs, server_branch($csuite);
+ push @specs, $rewritemap;
+ push @specs, qw(heads/*) if deliberately_not_fast_forward;
+
+ git_lrfetch_sane @specs;
my %here;
my @tagpats = debiantags('*',access_nomdistro);