threads / bug / 45539

BUG: Renaming a branch checked out in a different work tree

Subject: BUG: Renaming a branch checked out in a different work tree

## tl;dr

3 messages between Mar 29, 2017 and Mar 29, 2017.

replies: 2people: 3as markdown or json

Eyal Lotem· Mar 29, 2017, 18:02 UTC · lore

git version: 2.7.4 installed from Ubuntu repos: Ubuntu Version: 1:2.7.4-0ubuntu1

When renaming a branch checked out in a different work tree, that work tree's state is corrupted. Git status in that work tree then reports itself being on the "initial commit" with all files being in the staging area.

-- Eyal

Jonathan Nieder· Mar 29, 2017, 18:40 UTC · re: Eyal Lotem · lore

Re: BUG: Renaming a branch checked out in a different work tree

(+cc: Kazuki Yamaguchi --- thanks for writing the fix!) Hi Eyal,

Eyal Lotem wrote:
Show 8 quoted lines
> git version: 2.7.4
> installed from Ubuntu repos:
> Ubuntu Version: 1:2.7.4-0ubuntu1
>
> When renaming a branch checked out in a different work tree, that work
> tree's state is corrupted. Git status in that work tree then reports
> itself being on the "initial commit" with all files being in the
> staging area.

I believe this is fixed by v2.8.3~42^2~1 (branch -m: update all per-worktree HEADs, 2016-03-27).

Thanks and hope that helps, Jonathan

Andreas Schwab· Mar 29, 2017, 18:43 UTC · re: Eyal Lotem · lore

Re: BUG: Renaming a branch checked out in a different work tree

On Mär 29 2017, Eyal Lotem <eyal.lotem@gmail.com> wrote:
Show 8 quoted lines
> git version: 2.7.4
> installed from Ubuntu repos:
> Ubuntu Version: 1:2.7.4-0ubuntu1
>
> When renaming a branch checked out in a different work tree, that work
> tree's state is corrupted. Git status in that work tree then reports
> itself being on the "initial commit" with all files being in the
> staging area.
Fixed since 2.8.3.
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

← back to recent threads