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

Re: "add worktree" fails with "fatal: Invalid path" error

From
SHShaheed Haque <shaheedhaque@gmail.com>
Date
May 14, 2019, 14:48 UTC
Message-ID
<CAHAc2jfZ7QvZ_PTZo5q8orSStZL2y8GJ=ZPe2-+hcydjEZ0=Ew@mail.gmail.com>
In-Reply-To
<CACsJy8DnmQxO+r3ybg2zpCSMZJaTwc_C8V3QMCDjvga09sBigw@mail.gmail.com>
On Tue, 14 May 2019 at 13:34, Duy Nguyen <pclouds@gmail.com> wrote:
Show 11 quoted lines
>
> On Mon, May 13, 2019 at 7:55 PM Shaheed Haque <shaheedhaque@gmail.com> wrote:
> > The original code used the more obvious "git worktree remove" rather
> > than "git worktree prune" but I switched partly because remove seemed
> > slow (I cannot now quantify what caused me to think that), and partly
> > because I was having other issues which, I now realise, you probably
> > addressed in your recent "stat versus mkdir race" change.
>
> It should be as slow as "git status; rm -r". The first command _could_
> be slow. But if you find it significantly slower than that, I will be
> glad to receive another bug report.

After I wrote, I went back and checked, and I have no idea why I thought it slow. It seems just fine (by the time I have spawned out of Python and all), and so I have switched the code back to (synchronous/predictable) "git worktree remove".

Thanks, Shaheed
> --
> Duy
Previous: Duy NguyenNext: Nguyễn Thái Ngọc Duy
Message 5 of 10 in “"add worktree" fails with "fatal: Invalid path" error”
  1. Shaheed HaqueMay 12, 2019
  2. Duy NguyenMay 13, 2019
  3. Shaheed HaqueMay 13, 2019
  4. Duy NguyenMay 14, 2019
  5. Shaheed HaqueMay 14, 2019
  6. worktree add: be tolerant of corrupt worktreesNguyễn Thái Ngọc Duy, May 13, 2019
  7. Shaheed HaqueMay 13, 2019
  8. Eric SunshineMay 17, 2019
  9. Duy NguyenMay 18, 2019
  10. Shaheed HaqueJun 1, 2019

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.