From: Rubén Justo Date: Sat, 07 Jan 2023 00:35:51 GMT Subject: Re: [PATCH 1/2] branch: description for orphan branch errors Message-ID: <9a050344-27ea-4f26-e66a-2795596eb11d@gmail.com> In-Reply-To: On 7/1/23 0:59, Junio C Hamano wrote: > Rubén Justo writes: > >> Thinking of this as a whole, perhaps after this series we can add: > > Why "after"? If we already know that the existing patches are > making things worse and need to fix the regression with a future > patch to make it usable again, why introduce a regression in the > first place? > I'm not sure if it is so worse, and if the optimization is a fix. We're actually paying for worktrees twice in: reject_rebase_or_bisedt_branch() and replace_each_worktree_head_symref(). Making the change this way makes more obvious IMHO what we are moving and why. Start moving the ref_exists() in 1/2, easily leads to 2/1 and this patch squashed with 1/2, for little gain (IMHO) and worse history. This is why I think it's a good sequence. But I understand your point and I'm not opposed to doing it as you suggest if you think the current way doesn't pay off.