• Duy Nguyen's avatar
    branch: do not rename a branch under bisect or rebase · 14ace5b7
    Duy Nguyen authored
    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: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
    14ace5b7
worktree.c 7.4 KB