Re: "git worktree repair" modifies the wrong repository
- From
- Russell 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