about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-11-28 05:32:10 +0000
committerEric Wong <e@80x24.org>2022-11-28 23:38:58 +0000
commit37131af8eb12f6b0d715fd291c885cafec8be577 (patch)
tree814dfa71c702faf1e0367897814a5d75178df768 /lib/PublicInbox
parentaa82a5a136595d935705e8c9fbffe362e44b8917 (diff)
downloadpublic-inbox-37131af8eb12f6b0d715fd291c885cafec8be577.tar.gz
We need to be able to get rid of removed branches and tags on
the remote.  --prune-tags is implied for non-objstore repos,
and incompatible with objstore repos.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/LeiMirror.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 0e8689ca..2473c74b 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -275,6 +275,7 @@ sub fetch_args ($$) {
         push @cmd, '-q' if $lei->{opt}->{quiet} ||
                         ($lei->{opt}->{jobs} // 1) > 1;
         push @cmd, '-v' if $lei->{opt}->{verbose};
+        push(@cmd, '-p') if $lei->{opt}->{prune};
         @cmd;
 }
 
@@ -527,6 +528,7 @@ sub resume_fetch {
         }
         my $cmd = [ @{$self->{-torsocks}}, @git,
                         fetch_args($self->{lei}, $opt), $rn ];
+        push @$cmd, '-P' if $self->{lei}->{prune}; # --prune-tags implied
         start_cmd($self, $cmd, $opt, $fini);
 }