Article View: linux.kernel.git
Article #585Re: [PATCH v2 0/5] worktree repair: avoid breaking unrelated .git file and gitdir
From: Yoichi NAKAYAMA
Date: Thu, 15 Oct 2026 13:41
Date: Thu, 15 Oct 2026 13:41
43 lines
10451 bytes
10451 bytes
Sorry, I sent the previous email in HTML. I'm resending it as plain text. On Thu, Oct 15, 2026 at 7:46 AM Junio C Hamano <gitster@pobox.com> wrote: > > "Yoichi NAKAYAMA via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > 'git worktree repair' does not sufficiently validate the cross-references > > between a linked working tree and its administrative data before repairing > > them. This can cause the repair to modify the wrong .git file or gitdir in > > certain situations. > > > > > > v2 (0156021) > > ============ > > > > Split the first commit of v1 to make the changes easier to understand. Fold > > long lines. > > > > * [1/5] align .git file handling with repair_gitfile() > > * [2/5] centralize inferred backlink selection > > * [3/5] use read_gitfile_raw() in infer_backlink() > > * [4/5] reduce .git file reads > > * [5/5] avoid breaking unrelated .git file and gitdir > > Makes more sense to have this series as a logical progression of > smaller pieces compared to v1. > > What is "0156021" by the way? It is the first 7 characters of the commit hash in https://github.com/gitgitgadget/git/ (Creating a commit from an email changes the commit hash, so the identifier was meaningless.) Thanks, -- Yoichi NAKAYAMA
Technical Details
Message-ID:
<CAF5D8-uzTe2qm8MdoADkSunrKhc_qSLzjBG9CGR5tDAS32Xh5A@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72133-linux-kernel-git=dewy.ruReferences:
<pull.2225.git.1789269613.gitgitgadget@gmail.com> <pull.2225.v2.git.1792012836.gitgitgadget@gmail.com> <xmqqmrsfq4rm.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72133-linux-kernel-git=dewy.ru
From: yoichi.nakayama@gmail.com (Yoichi NAKAYAMA)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 0/5] worktree repair: avoid breaking unrelated .git
file and gitdir
Date: Thu, 15 Oct 2026 22:41:02 +0900
Organization: Usenet Network
Message-ID: <CAF5D8-uzTe2qm8MdoADkSunrKhc_qSLzjBG9CGR5tDAS32Xh5A@mail.gmail.com>
References: <pull.2225.git.1789269613.gitgitgadget@gmail.com>
<pull.2225.v2.git.1792012836.gitgitgadget@gmail.com> <xmqqmrsfq4rm.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2542322"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:T7olDXxAdASffRVXY0s0ArFXQaQ= sha256:0hO1JxrIzrMd9eIX4/nDhoMfLV3FXcRK/wnOXVktoD0=
sha1:0qvtBofNY5hsouKyJ10AolIBXdA= sha256:rmF8FkaFWHj8G1W8wyrX6RSs48Hpx31eM7aoFv4vDcE=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 1FC52110316; Thu, 15 Oct 2026 16:53:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.748
X-Spam-Status: No, score=-0.748 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 26ytDUx3t4k8;
Thu, 15 Oct 2026 16:53:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-72133-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id DB502110304; Thu, 15 Oct 2026 16:53:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id 8728741081; Thu, 15 Oct 2026 13:41:19 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E1F8511208;
Thu, 15 Oct 2026 13:41:17 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iM0q873P"
X-Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42EFA2F7ACE
for <git@vger.kernel.org>; Thu, 15 Oct 2026 13:41:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.219.50
X-ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1792071676; cv=pass; b=p9aFtwx5n4S1j+7JnyFJNWRYsUucd0/BkVW7MY+6zxiXTeY0GzKfQETuB0Ikws2Me4qPJ7xPD5XfsTl4WbzZIlfeqx8toL24m8Yu74aDqsKf3YIuyD/x1CB8P513sit8etmIaFD8EsSDg/9HwdyHZmLwafpH1SwyxQ7V73Wt868=
X-ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1792071676; c=relaxed/simple;
bh=vbQuUtmHV2z+wS0ZqF7K6lYrubh9pEBOHNdzrenHmJ8=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=Xnj6MiLo0iqV9vdZs9aU2PmfmXKHJOIQC9t5L7JXkp9OsX29q1bQyYmwNIGwB7QQxzGjRl3ixQnp6/rAAAzAyqbAloY+dbNWL1XnANbXEprslzzPA+Bhw61hgZJxAvdZYs7mkkjBWAC9cNgseZpX3N23IhrKOhVYaQv+/M6KKzI=
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iM0q873P; arc=pass smtp.client-ip=209.85.219.50
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-917ad52d7b6so16736876d6.2
for <git@vger.kernel.org>; Thu, 15 Oct 2026 06:41:14 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792071674; cv=none;
d=google.com; s=arc-20260327;
b=dlqRkJhVzclqI1qTefSySlMfUf+MxAiNct7eZJNdE7IdA60dqZ4SJpObZKCbsy9688
3LsRRq+ph0zMPW7weHvQXg/g1kYnqZ/ihbZRj1+Qtf3eEJ2D9wxwqMA+y+2T+HKFmYNT
KL/r/8eLhXgWRQ33fcjm3dLFNJhCo4wsltBus84CEWUGNS9VRwuglVAJ4UcXUgmgSbii
9+l2aB/UWj6xd8jsFi4/+xcgReycjJ+quCkEPHztcbFiySz5zbSE3YBubTbNtJ125w1C
N2IJ9D4034yumsW1N/BdB901hxgGmFcMGKLqIMKxCy4GxUKo6z/4g9ljt0BLjtlhUE0I
il1w==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=YOXYGMC9YDLGufXnpNUT9sIoj2gHUhzL0rqISJtSs/A=;
fh=eGiqeW1dgT/8qRSthAMHdk7gh8+8tP90n3beR7tXtNI=;
b=l4S4eV0M6D3T+x61F1lRBwCqtgHoMcFwI2vBpAXZ6J1sKki1nK8ohvUkOViPLQutcl
mQFhWGYq4bRmOcdIXaKOcb9SS51h5YZ7mHZh2pN1/07u6ozNvzt7alQUJkcZ5HTKu0bj
HR4skw9gFcF0LweILNpF6T5h6oAmuvY5Bpj/g3GcrDmjk5PwHpG4cZxavZpqX9MCTuMF
qG5dJU7/S13Duvd+JWnHDhOjyLd8AeuF8r49qz/SckCjXpuKnQ2Dvvr4U5IlZDeRki7e
n77s0dc1rdSlUJ8rw9L+jOm2gFPK7e26UGSbfQFXQDnywpYBvRLT+ecNEfOsxlIexkuJ
mAsg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792071674; x=1792676474; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=YOXYGMC9YDLGufXnpNUT9sIoj2gHUhzL0rqISJtSs/A=;
b=iM0q873PWNclyPpN8u5/eGHkZMHe5nEtfxLKc8zgG3Vw/KuY7tecxueD2598Pm3xDj
WhkZJiBpTJgUJgosN7MdPb5Vv30UaxrwhngxT5o+YjYw3HeLpRJhAFqWNG8wzyQcBFs7
7YdOtCpzdn+ht6rDJPC/DEK1pKOP/FyGP8ymfIjXHUbvv60+j9L42nWVUM+4gvs/lAFO
33k6HdQSzD9nrFy/viN58WKhuxozCkRo6vVd8e07CV/qxzyKl/W4NmuuHOILmeUvhQqQ
fX8XZjfNUFDThwfHrPL8S7f4+zYgGtaKasoEkG6LPYcToUycKgsEUcovmEGgq2xrNMe+
p/oA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792071674; x=1792676474;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=YOXYGMC9YDLGufXnpNUT9sIoj2gHUhzL0rqISJtSs/A=;
b=AOYySk3SWuyKdh4ZTY1uzwCrlTgdKvpTsLKeV0TYQB5c45a/u0wJu6mjTYeXslEkoR
zSXW8KZsJ6RYFsuv/1z70vtct4Mpj462H1V1wUZrBk5+020oliUhuq7EBzSX/gWKpfWR
jkl705R1hMDd2hZ8OBFRBk4QMXbCycXGTHA+vsGtn/nYt0iYaLKF1oZpY9X61f3/Wirj
dxDcUXXxJ3ngb0RYQ9qOOvkhCmSQ7VWKEYG+bHyCO0YW/Hv9Ppz4K7QKULISyEGIZTOo
205QqJcKEB5XWwi87cVQuUSg0ypwQ8smRZ8CNy5iNoHaSxFk6L4Qx0EYNPTilJyH2Aao
4gPQ==
X-Forwarded-Encrypted: i=1; AKwUvBxpscmdad/CVl2EoCKqtUwpZZHuDLIOe6oM6y2T7n+uHdN+5fwBuCmibe1fWHBLofp74m0=@vger.kernel.org
X-Gm-Message-State: AFq9FYKiZLLmnWZA/eOvm9kEiv/vrDEScU4mIhV94Mbqx9svxD9fai1/
E3Gwii/wC05PUwaWZ8gpd11Tr5IpPS2lcSlcISNe1uuB8bAdlGhdz4PYuC8jnO6si7v4Dpasm4D
mFclLtkrLlVK/cTvs+Ar0mgxS5dsGi1M=
X-Gm-Gg: AYBFou1hV6KX/YCAPmPGU0yZf5FkJO24+Zba7DsgyW5iyToSo06FwnnHOrOKzHg9bL+
/nAD81HF9CaqJHayN2yo9MktNfMeD8lgQHPnX/i8wvgLECBB77YDIRN42MSt2Z/dOXmqGEaWRRR
Vtp2hTn3XdCtN9KEaF0JX3jXa59WyvNQjTclQOwpT7iFvuRlakY8TC/ICu2n1yjGFUyiFYQNwLa
xFG/3V+5k9wAmPhWJDOOJqi146Vzr654yOUNCu2OZ4Zfd4+/rA/Spm2mm7KK2AeRNDS0ej0BQLx
ENJSlWDKhme+wRa+5A5YgzZWz+WHfrwpD4jP0v9AOZBWiWzSBHz+guE7+hc6n4MmTHOKzmvbkmb
+6rH/+xe3UH9WmM3lMQDtSUQisChmpAsMjSxEL6xg7V/P
X-Received: by 2002:a05:6214:ca6:b0:914:2c9d:b376 with SMTP id
6a1803df08f44-91b55806013mr339986206d6.46.1792071673800; Thu, 15 Oct 2026
06:41:13 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-In-Reply-To: <xmqqmrsfq4rm.fsf@gitster.g>
X-Gm-Features: AclHuK_UwFQ6FdRNk__W_IHkCBGok_COoCK-XILkHvBCTcqSAMD3U5YgpgpF-Cw
X-Cc: Yoichi NAKAYAMA via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org,
Eric Sunshine <sunshine@sunshineco.com>