Re: [PATCH 0/3] git worktree prune improvements
On Sat, Mar 3, 2018 at 9:21 PM, Randall S. Beckerwrote: > On March 2, 2018 10:39 PM, Nguy?n Thái Ng?c Duy wrote: >> This is something we could do to improve the situation when a user manually >> moves a worktree and not follow the update process (we have had the first >> reported case [1]). Plus a bit cleanup in gc. >> >> I think this is something we should do until we somehow make the user >> aware that the worktree is broken as soon as they move a worktree >> manually. But there's some more work to get there. >> >> [1] http://public-inbox.org/git/%3Caa98f187-4b1a-176d-2a1b- >> 826c99577...@aegee.org%3E > > I wonder whether the OT thread discussion about branch annotation may have > some value here. For some repositories I manage, I have received questions > about whether there was some way to know that a branch in the clone was > associated with a worktree "at any point in the past", which, once the > worktree has been pruned, is not derivable in a formal computational sense - > there may be specific conditions where it is. Perhaps, if that line of > development moves forward, that we should considering annotating the > worktree-created branch to help with our pruning process and to identify > where the branch originated. > I think for pruning, we already have that information. If a branch is associated to a worktree, its HEAD must say so and we must not prune anything reachable from _any_ HEAD. I made that mistake actually. Still in process of fixing it (and fsck). -- Duy
RE: [PATCH 0/3] git worktree prune improvements
On March 2, 2018 10:39 PM, Nguy?n Thái Ng?c Duy wrote: > This is something we could do to improve the situation when a user manually > moves a worktree and not follow the update process (we have had the first > reported case [1]). Plus a bit cleanup in gc. > > I think this is something we should do until we somehow make the user > aware that the worktree is broken as soon as they move a worktree > manually. But there's some more work to get there. > > [1] http://public-inbox.org/git/%3Caa98f187-4b1a-176d-2a1b- > 826c99577...@aegee.org%3E I wonder whether the OT thread discussion about branch annotation may have some value here. For some repositories I manage, I have received questions about whether there was some way to know that a branch in the clone was associated with a worktree "at any point in the past", which, once the worktree has been pruned, is not derivable in a formal computational sense - there may be specific conditions where it is. Perhaps, if that line of development moves forward, that we should considering annotating the worktree-created branch to help with our pruning process and to identify where the branch originated. Just a thought. Cheers, Randall -- Brief whoami: NonStop developer since approximately NonStop(2112884442) UNIX developer since approximately 421664400 -- In my real life, I talk too much.
[PATCH 0/3] git worktree prune improvements
This is something we could do to improve the situation when a user manually moves a worktree and not follow the update process (we have had the first reported case [1]). Plus a bit cleanup in gc. I think this is something we should do until we somehow make the user aware that the worktree is broken as soon as they move a worktree manually. But there's some more work to get there. [1] http://public-inbox.org/git/%3caa98f187-4b1a-176d-2a1b-826c99577...@aegee.org%3E Nguyễn Thái Ngọc Duy (3): gc.txt: more details about what gc does worktree: delete dead code worktree prune: improve prune logic when worktree is moved Documentation/git-gc.txt | 12 ++-- Documentation/gitrepository-layout.txt | 5 - builtin/worktree.c | 11 +++ 3 files changed, 13 insertions(+), 15 deletions(-) -- 2.16.1.435.g8f24da2e1a