]> git.ipfire.org Git - thirdparty/git.git/commit - worktree.h
branch: do not rename a branch under bisect or rebase
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 22 Apr 2016 13:01:36 +0000 (20:01 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 21:09:39 +0000 (14:09 -0700)
commit14ace5b77b493506a1f8ffde96a2f49cc7bc4db0
tree50c5dee66f1f65027675b1d2e187fc418f2831e6
parent04a3dfb8b5993fcb807fcbca8ed7ea608d30a204
branch: do not rename a branch under bisect or rebase

The branch name in that case could be saved in rebase's head_name or
bisect's BISECT_START files. Ideally we should try to update them as
well. But it's trickier (*). Let's play safe and see if the user
complains about inconveniences before doing that.

(*) If we do it, bisect and rebase need to provide an API to rename
branches. We can't do it in worktree.c or builtin/branch.c because
when other people change rebase/bisect code, they may not be aware of
this code and accidentally break it (e.g. rename the branch file, or
refer to the branch in new files). It's a lot more work.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
t/t2025-worktree-add.sh
worktree.c
worktree.h