diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-03-27 23:37:14 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-04 12:57:22 -0700 |
commit | 70999e9ceca47e03b8900bfb310b2f804125811e (patch) | |
tree | 8a1b8017985cb7def44f282dfde91844102c8e45 /t/t1060-object-corruption.sh | |
parent | refs: add a new function set_worktree_head_symref (diff) | |
download | tgif-70999e9ceca47e03b8900bfb310b2f804125811e.tar.xz |
branch -m: update all per-worktree HEADs
When renaming a branch, currently only the HEAD of current working tree
is updated, but it must update HEADs of all working trees which point at
the old branch.
This is the current behavior, /path/to/wt's HEAD is not updated:
% git worktree list
/path/to 2c3c5f2 [master]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m master master2
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m oldname newname
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 0000000 [oldname]
This patch fixes this issue by updating all relevant worktree HEADs
when renaming a branch.
Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1060-object-corruption.sh')
0 files changed, 0 insertions, 0 deletions