git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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(-)
Previous: Yoichi NAKAYAMANext: Yoichi NAKAYAMA
Message 16 of 23 in “worktree repair: avoid breaking unrelated .git file and gitdir”
  1. 0/2 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Sep 13, 2026
  2. 1/2 worktree repair: refactor and reduce .git file readsYoichi NAKAYAMA via GitGitGadget, Sep 13, 2026
  3. Junio C HamanoOct 8, 2026
  4. Yoichi NAKAYAMAOct 11, 2026
  5. Yoichi NAKAYAMAOct 12, 2026
  6. 2/2 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Sep 13, 2026
  7. Yoichi NAKAYAMAOct 8, 2026
  8. 0/5 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  9. 1/5 worktree repair: align .git file handling with repair_gitfile()Yoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  10. 2/5 worktree repair: centralize inferred backlink selectionYoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  11. 3/5 worktree repair: use read_gitfile_raw() in infer_backlink()Yoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  12. 4/5 worktree repair: reduce .git file readsYoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  13. 5/5 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Oct 14, 2026
  14. Junio C HamanoOct 15, 2026
  15. Yoichi NAKAYAMAOct 17, 2026
  16. Junio C HamanoOct 14, 2026
  17. Yoichi NAKAYAMAOct 15, 2026
  18. 0/5 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Oct 17, 2026
  19. 1/5 worktree repair: align .git file handling with repair_gitfile()Yoichi NAKAYAMA via GitGitGadget, Oct 17, 2026
  20. 2/5 worktree repair: centralize inferred backlink selectionYoichi NAKAYAMA via GitGitGadget, Oct 17, 2026
  21. 3/5 worktree repair: use read_gitfile_raw() in infer_backlink()Yoichi NAKAYAMA via GitGitGadget, Oct 17, 2026
  22. 4/5 worktree repair: reduce .git file readsYoichi NAKAYAMA via GitGitGadget, Oct 17, 2026
  23. 5/5 worktree repair: avoid breaking unrelated .git file and gitdirYoichi NAKAYAMA via GitGitGadget, Oct 17, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.