Re: [PATCH v3 2/2] worktree: notify post-worktree hook when pruning
- From
Anders Kaseorg <andersk@mit.edu>
- Date
- Nov 11, 2026, 06:48 UTC
- Message-ID
- <3e1639a1-2d27-4814-b57e-660e045da04b@mit.edu>
- In-Reply-To
- <f7ead9bc-fe6e-49c1-bb7d-6efd14eb6766@mtasv.net>
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