branch: rename orphan branches in any worktree
commita675ad1708383f47883d0bb0b2dada827a295acd
authorRubén Justo <rjusto@gmail.com>
Sun, 26 Mar 2023 22:33:27 +0000 (27 00:33 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2023 16:40:15 +0000 (27 09:40 -0700)
tree1441efc27a622be851366e28ddf210ba16f1cbb7
parent7a6ccdfb4eeb9d55893eae9b2c7e573b92f3d01d
branch: rename orphan branches in any worktree

In cfaff3aac (branch -m: allow renaming a yet-unborn branch, 2020-12-13)
we added support for renaming an orphan branch when that branch is
checked out in the current worktree.

Let's also allow renaming an orphan branch checked out in a worktree
different than the current one.

Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
t/t3200-branch.sh