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

Re: [PATCH 3/3] worktree: don't allow "add" validation to be fooled by suffix matching

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 24, 2020, 21:06 UTC
Message-ID
<xmqqv9nvofuc.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20200224090848.54321-4-sunshine@sunshineco.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
> Avoid the problem of potential accidental matching against an existing
> worktree by instead taking advantage of find_worktree_by_path() which
> matches paths deterministically, without applying any sort of magic
> shorthand matching performed by find_worktree().

Combination of 2/3 and 3/3 makes perfect sense as "fix once and for all" solution.

Thanks.
Previous: Eric SunshineNext: Eric Sunshine
Message 6 of 8 in “BUG: git worktree add directory-path fails due to over-aggressive disallowing of worktrees with same suffix”
  1. Cameron GunninFeb 11, 2019
  2. Eric SunshineFeb 12, 2019
  3. 0/3 git-worktree: fix "add" being fooled by suffix matchingEric Sunshine, Feb 24, 2020
  4. 2/3 worktree: add utility to find worktree by pathnameEric Sunshine, Feb 24, 2020
  5. 3/3 worktree: don't allow "add" validation to be fooled by suffix matchingEric Sunshine, Feb 24, 2020
  6. Junio C HamanoFeb 24, 2020
  7. 1/3 worktree: improve find_worktree() documentationEric Sunshine, Feb 24, 2020
  8. Junio C HamanoFeb 24, 2020

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.