Worktree "gitdir" file being mangled after upgrade to 2.7.0
Since upgrading to 2.7.0 last week, eventually I'll get to a point when I run 'git worktree list' where several worktrees are incorrectly reported as pointing to my main git checkout. Further analysis of the files in $GIT_DIR/worktrees/worktree_name/ shows that the gitdir file for the worktrees which display incorrectly contains ".git" instead of what it should contain (i.e. "/path/to/worktree/.git".
This was reported a couple days ago on Github:
https://github.com/git/git-scm.com/issues/650
Since the audiences for the mailing list and Github don't overlap completely, I figured I'd report it here to get this issue in front of as many eyes as possible.
--
-Erik
"For me, it is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring." --Carl Sagan
Quoted 7 lines · Erik Johnson
Since upgrading to 2.7.0 last week, eventually I'll get to a point when I run 'git worktree list' where several worktrees are incorrectly reported as pointing to my main git checkout. Further analysis of the files in $GIT_DIR/worktrees/worktree_name/ shows that the gitdir file for the worktrees which display incorrectly contains ".git" instead of what it should contain (i.e. "/path/to/worktree/.git".
Quoted 7 lines
This was reported a couple days ago on Github:
https://github.com/git/git-scm.com/issues/650
Since the audiences for the mailing list and Github don't overlap completely, I figured I'd report it here to get this issue in front of as many eyes as possible.
Thanks for relaying. Duy, Michael, I think this is your area?
Quoted 11 lines · Junio C Hamano
Quoted 9 lines · Erik Johnson
Since upgrading to 2.7.0 last week, eventually I'll get to a point when I run 'git worktree list' where several worktrees are incorrectly reported as pointing to my main git checkout. Further analysis of the files in $GIT_DIR/worktrees/worktree_name/ shows that the gitdir file for the worktrees which display incorrectly contains ".git" instead of what it should contain (i.e. "/path/to/worktree/.git".
This was reported a couple days ago on Github:
Quoted 7 lines
Quoted 5 lines
https://github.com/git/git-scm.com/issues/650
Since the audiences for the mailing list and Github don't overlap completely, I figured I'd report it here to get this issue in front of as many eyes as possible.
Thanks for relaying. Duy, Michael, I think this is your area?
The only place that a relative pat hcan be written is update_linked_girdir() unless i'm mistaken. That function is being deleted "soon" because it causes another problem
Signature · 1 line
Duy
Quoted 18 lines · Duy Nguyen
Quoted 17 lines · Junio C Hamano
Quoted 14 lines · Erik Johnson
Since upgrading to 2.7.0 last week, eventually I'll get to a point when I run 'git worktree list' where several worktrees are incorrectly reported as pointing to my main git checkout. Further analysis of the files in $GIT_DIR/worktrees/worktree_name/ shows that the gitdir file for the worktrees which display incorrectly contains ".git" instead of what it should contain (i.e. "/path/to/worktree/.git".
This was reported a couple days ago on Github:
https://github.com/git/git-scm.com/issues/650
Since the audiences for the mailing list and Github don't overlap completely, I figured I'd report it here to get this issue in front of as many eyes as possible.
Quoted 5 lines
Quoted 1 line
Thanks for relaying. Duy, Michael, I think this is your area?
The only place that a relative path can be written is
update_linked_girdir()unless i'm mistaken. That function is being deleted "soon" because it causes another problem
git worktree list command does not modify the worktree gitdir file, so this is only a symptom of the problem. If at all possible, we should move to get Duy's fix into the 2.7.1 release. This problem almost makes git worktree list useless.
Quoted 2 lines
--
Duy
Quoted 10 lines · Mike Rappazzo
Quoted 5 lines
Quoted 1 line
Thanks for relaying. Duy, Michael, I think this is your area?
The only place that a relative path can be written is
update_linked_girdir()unless i'm mistaken. That function is being deleted "soon" because it causes another problem
git worktree listcommand does not modify the worktree gitdir file, so this is only a symptom of the problem. If at all possible, we should move to get Duy's fix into the 2.7.1 release. This problem almost makes git worktree list useless.
Yes, what's the doneness of that "being deleted 'soon'"?
Thanks.
Quoted 6 lines · Erik Johnson
Since upgrading to 2.7.0 last week, eventually I'll get to a point when I run 'git worktree list' where several worktrees are incorrectly reported as pointing to my main git checkout. Further analysis of the files in $GIT_DIR/worktrees/worktree_name/ shows that the gitdir file for the worktrees which display incorrectly contains ".git" instead of what it should contain (i.e. "/path/to/worktree/.git".
This always happens to me when I run "git rebase" in a worktree.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."