From: Anders Kaseorg Date: Wed, 11 Nov 2026 06:48:31 GMT Subject: Re: [PATCH v3 2/2] worktree: notify post-worktree hook when pruning Message-ID: <3e1639a1-2d27-4814-b57e-660e045da04b@mit.edu> In-Reply-To: On 10/4/26 16:09, Domen Kožar wrote: > + sed "s/w2/w1/" .git/worktrees/w2/gitdir >.git/worktrees/w2/gitdir.new && > + mv .git/worktrees/w2/gitdir.new .git/worktrees/w2/gitdir && This substitution misfires if we’re inside a path containing another ‘w2’ as a substring. How about cp .git/worktrees/w1/gitdir .git/worktrees/w2/gitdir && (There’s already another instance of this bug in t2401-worktree-prune.sh, and I observed that failing in https://launchpad.net/~git-core/+archive/ubuntu/candidate/+build/33960210.) Anders