From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 66E712019A for ; Mon, 28 Nov 2022 05:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1669613563; bh=Ku0ieEr+ai4uONwiY9O3e7M2Olos20HV2VY9cR+WOnk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wWw5S/siqMje/SrctSUHKnQpDFTiuv85z7T7jIcyDLeO8ymK5zs7bTOSBsV+g8dkC nzvD1KCkuArwIlAVgs5ub62srgnbJSGqO6AllTyCfPcuzUY84HlCodbnHTIGImHfUm qoaBYNnGzJ0u5WHvsolglAJIerJd9aFlpGJZtIPU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 51/95] lei_mirror: force --no-tags when fetching forkgroups Date: Mon, 28 Nov 2022 05:31:48 +0000 Message-Id: <20221128053232.291618-52-e@80x24.org> In-Reply-To: <20221128053232.291618-1-e@80x24.org> References: <20221128053232.291618-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We can't have multiple remotes writing to refs/tags/* (instead of refs/remotes/*/tags) due to potential conflicts. --- lib/PublicInbox/LeiMirror.pm | 6 ++++-- 1 file 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);