summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-09 00:20:21 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-09 13:08:31 +0000
commit88cd6864aec4140ee548ab3a3d318879fd7e9325 (patch)
treef2986bf1cd2c32c8f2b03d809af68ed779aa36ad /dgit
parentecc0a016f61631ea537d052286f2ec141f1b94bc (diff)
git fetching: git_lrfetch_sane: Tidy up old suite-based refs
We should look for these and delete them, when we have the chance, because otherwise nothing ever would. For now we just use $csuite if we have it, and otherwise do nothing. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit10
1 files changed, 10 insertions, 0 deletions
diff --git a/dgit b/dgit
index 1fdc26c..8c9765e 100755
--- a/dgit
+++ b/dgit
@@ -2673,6 +2673,16 @@ END
}
last;
}
+
+ if (defined $csuite) {
+ printdebug "git_lrfetch_sane: tidying any old suite lrfetchrefs\n";
+ git_for_each_ref("refs/dgit-fetch/$csuite", sub {
+ my ($objid,$objtype,$lrefname,$reftail) = @_;
+ next if $lrfetchrefs_f{$lrefname}; # $csuite eq $distro ?
+ runcmd_ordryrun_local @git, qw(update-ref -d), $lrefname;
+ });
+ }
+
printdebug "git_lrfetch_sane: git fetch --no-insane emulation complete\n",
Dumper(\%lrfetchrefs_f);
}