diff options
author | Eric Wong <e@80x24.org> | 2022-11-28 05:31:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-11-28 23:38:56 +0000 |
commit | d58adce592aa4fa719d095b6f3f05665a2f7b394 (patch) | |
tree | 5ec5ca924ec4198499d11617e739fa55e54d3d92 /lib/PublicInbox | |
parent | 4bc708478281771874bb23b88b9a04b70dddac78 (diff) | |
download | public-inbox-d58adce592aa4fa719d095b6f3f05665a2f7b394.tar.gz |
We can't have multiple remotes writing to refs/tags/* (instead of refs/remotes/*/tags) due to potential conflicts.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/LeiMirror.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index 21341efb..d6aca800 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -375,7 +375,7 @@ sub fgrp_fetched { sub fgrp_fetch { my ($fgrp, $fini) = @_; my $cmd = [ @{$fgrp->{-torsocks}}, 'git', "--git-dir=$fgrp->{-osdir}", - fetch_args($fgrp->{lei}, my $opt = {}), + fetch_args($fgrp->{lei}, my $opt = {}), '--no-tags', $fgrp->{-remote} ]; $fgrp->{-fini} = $fini; do_reap($fgrp); @@ -405,7 +405,9 @@ sub forkgroup_prep { my $key = $self->{-key} // die 'BUG: no -key'; my ($bn) = ($key =~ m{/([a-z0-9_,;=!\+\{\}\|][^/]*)(?:\.git)?\z}i); my $rn = "$bn-".substr(sha256_hex($key), 0, 16); - for ("url=$uri", "fetch=+refs/*:refs/remotes/$rn/*") { + # --no-tags is required to avoid conflicts + for ("url=$uri", "fetch=+refs/*:refs/remotes/$rn/*", + 'tagopt=--no-tags') { my @kv = split(/=/, $_, 2); $kv[0] = "remote.$rn.$kv[0]"; run_die([@cmd, @kv], undef, $opt); |