diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-09 00:20:21 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-09 13:08:31 +0000 |
commit | 88cd6864aec4140ee548ab3a3d318879fd7e9325 (patch) | |
tree | f2986bf1cd2c32c8f2b03d809af68ed779aa36ad /dgit | |
parent | ecc0a016f61631ea537d052286f2ec141f1b94bc (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-x | dgit | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); } |