Re: [PATCH v2 0/5] worktree repair: avoid breaking unrelated .git file and gitdir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 14, 2026, 22:46 UTC
- Message-ID
- <xmqqmrsfq4rm.fsf@gitster.g>
- In-Reply-To
- <pull.2225.v2.git.1792012836.gitgitgadget@gmail.com>
"Yoichi NAKAYAMA via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 17 quoted lines
> '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?
Thanks.
> t/t2406-worktree-repair.sh | 33 +++++++++-- > worktree.c | 113 +++++++++++++++++++++---------------- > 2 files changed, 91 insertions(+), 55 deletions(-)