Git development
 help / color / mirror / Atom feed
From: "Anders Kaseorg" <andersk@mit.edu>
To: domen@cachix.org, git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH v3 2/2] worktree: notify post-worktree hook when pruning
Date: Tue, 10 Nov 2026 22:48:31 -0800	[thread overview]
Message-ID: <3e1639a1-2d27-4814-b57e-660e045da04b@mit.edu> (raw)
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


  reply	other threads:[~2026-11-11  6:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 23:36 [PATCH v1 0/3] worktree: add post-worktree-add and post-worktree-remove hooks Domen Kožar
2026-07-10  9:34 ` Phillip Wood
     [not found]   ` <CAMvcdZS=ZYbLmjKaGJvjQ_fWYhVbOzwMvYq+MMENWPYi_RiqvQ@mail.gmail.com>
2026-07-13 13:19     ` Phillip Wood
2026-08-04 18:14 ` [PATCH v2 0/4] worktree: add lifecycle hooks Domen Kožar
2026-08-04 19:03   ` Caleb White
2026-08-04 20:28     ` Junio C Hamano
2026-08-30 17:21       ` Domen Kožar
2026-09-07 14:30         ` Domen Kožar
2026-09-07 18:18           ` Kristoffer Haugsbakk
2026-09-07 19:34             ` Domen Kožar
2026-10-03 18:47       ` Maciej Ciemborowicz
2026-10-04 23:09   ` [PATCH v3 0/2] worktree: add post-worktree lifecycle hook Domen Kožar
2026-10-05 16:47     ` Junio C Hamano
     [not found]   ` <cover.1791152172.git.domen@cachix.org>
2026-10-04 23:09     ` [PATCH v3 1/2] " Domen Kožar
2026-10-06  9:23       ` Phillip Wood
2026-10-04 23:09     ` [PATCH v3 2/2] worktree: notify post-worktree hook when pruning Domen Kožar
2026-11-11  6:48       ` Anders Kaseorg [this message]
     [not found] ` <20260804181358.532970-1-domen@cachix.org>
2026-08-04 18:14   ` [PATCH v2 1/4] worktree: add post-worktree-add hook Domen Kožar
2026-08-04 20:03     ` Caleb White
2026-08-04 18:14   ` [PATCH v2 2/4] worktree: add post-worktree-remove hook Domen Kožar
2026-08-04 18:14   ` [PATCH v2 3/4] worktree: run post-worktree-remove hook when pruning Domen Kožar
2026-08-04 18:14   ` [PATCH v2 4/4] worktree: add post-worktree-move hook Domen Kožar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e1639a1-2d27-4814-b57e-660e045da04b@mit.edu \
    --to=andersk@mit.edu \
    --cc=domen@cachix.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox