git worktree bug: paths are being reset to the main repository directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

doing a git reset --hard in one of the worktrees will reset the path in $GIT_DIR/worktrees/worktree_name/gitdir to .git, so after that point all thusly modified worktrees will look as if they live in current woorktree root.

State before:

# cd /Users/user/Desktop/Source/Product && git worktree list
/Users/user/Desktop/Source/Product          2991e32 [master]
/Users/user/Desktop/Source/Product-2.1      3fc1082 [releases/master-2.1]
/Users/user/Desktop/Source/Product-2.2      3ccc3fe [releases/master-2.2]
/Users/user/Desktop/Source/Product-2.3      4044881 [releases/master-2.3]
/Users/user/Desktop/Source/Product-2.3-S11  4a67d36 [customer/S11]
/Users/user/Desktop/Source/Product-2.2-S22  2d2503a [customer/S22]

# pushd /Users/user/Desktop/Source/Product-2.2; git reset --hard; popd

# git worktree list
/Users/user/Desktop/Source/Product          2991e32 [master]
/Users/user/Desktop/Source/Product-2.1      3fc1082 [releases/master-2.1]
/Users/user/Desktop/Source/Product          3ccc3fe [releases/master-2.2]
/Users/user/Desktop/Source/Product-2.3      4044881 [releases/master-2.3]
/Users/user/Desktop/Source/Product-2.3-S11  4a67d36 [customer/S11]
/Users/user/Desktop/Source/Product-2.3-S33  174575e [customer/S33]
/Users/user/Desktop/Source/Product-2.2-S22  2d2503a [customer/S22]

3ccc3fe is now (incorrectly) claimed to be represented in <pwd>.

Servus,
      Daniel

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]