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

Re: "git worktree repair" modifies the wrong repository

From
RSRussell Stuart <russell+git.vger.kernel.org@stuart.id.au>
Date
Sep 19, 2024, 10:16 UTC
Message-ID
<3b579ddd-b386-4daa-ad63-1e75522b7462@stuart.id.au>
In-Reply-To
<CAPig+cQ8=Y6sVvN_dBo_GQ5nLkQ4GJ7AM6mE2kt_2QV7CR0omg@mail.gmail.com>
On 19/9/24 18:58, Eric Sunshine wrote:
> I have a tentative fix implemented which seems to handle this case 
> correctly. Once I've finished polishing it and formalizing the
> related test, I'll send out a patch.
Fantastic.

I noticed repair hadn't changed the directories I thought it had, but had said it was changing something. Pondering what on earth could of happened, my first thought "surely not" - and then checked the originals. It caught me totally by surprise. Everyone I showed it to expressed the same surprise.

I can't resist pointing out if "git worktree add" had of preserved the relative paths I gave it, it would not have happened.

-- 
Regards,
Russell Stuart
Previous: Eric SunshineNext: Eric Sunshine
Message 3 of 11 in “"git worktree repair" modifies the wrong repository”
  1. Russell StuartSep 19, 2024
  2. Eric SunshineSep 19, 2024
  3. Russell StuartSep 19, 2024
  4. Eric SunshineSep 19, 2024
  5. Russell StuartSep 19, 2024
  6. Eric SunshineSep 23, 2024
  7. Phillip WoodSep 24, 2024
  8. Eric SunshineOct 3, 2024
  9. phillip.wood123@gmail.comOct 4, 2024
  10. Junio C HamanoOct 4, 2024
  11. Russell StuartSep 25, 2024

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.