Re: Worktree silently deleted on git fetch/gc/log

2018-03-07 Thread Duy Nguyen
On Sat, Mar 3, 2018 at 5:05 PM, Eric Sunshine wrote: > I can't presently think of a reason why gitdir needed/used an absolute > or normalized path. Was it because there was some need to compare such > paths? No, we need to re-normalize paths before comparing anyway to be

Re: Worktree silently deleted on git fetch/gc/log

2018-03-03 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 6:53 AM, Duy Nguyen wrote: > I'm going to improve it a bit in this case either way, I think I have > some idea: (mostly to Eric) since worktree B is alive and kicking, it > should keep at least HEAD or index updated often. We can delay > deleting a

Re: Worktree silently deleted on git fetch/gc/log

2018-03-02 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 6:34 PM, Дилян Палаузов wrote: > Hello Duy, > > thanks for your answer. > > Your assumption is correct: when renaming the directory apparently I have > not adjusted /git/A/.git/worktrees/B/gitdir to the new location. > > I fixed the situation by

Re: Worktree silently deleted on git fetch/gc/log

2018-03-02 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 6:34 AM, Дилян Палаузов wrote: > Your assumption is correct: when renaming the directory apparently I have > not adjusted /git/A/.git/worktrees/B/gitdir to the new location. > > I fixed the situation by renaming /git/B to /git/B.bak, creating a

Re: Worktree silently deleted on git fetch/gc/log

2018-03-02 Thread Дилян Палаузов
Hello Duy, thanks for your answer. Your assumption is correct: when renaming the directory apparently I have not adjusted /git/A/.git/worktrees/B/gitdir to the new location. I fixed the situation by renaming /git/B to /git/B.bak, creating a new worktree pointing to /git/B (with branch g),

Re: Worktree silently deleted on git fetch/gc/log

2018-03-01 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 3:14 AM, Eric Sunshine wrote: > As far as I know, there isn't any code in Git which would > automatically remove the .git/worktrees/B directory, so it's not clear > how that happened. "git worktree prune" does, which is called by "git gc" and that

Re: Worktree silently deleted on git fetch/gc/log

2018-03-01 Thread Eric Sunshine
On Thu, Mar 1, 2018 at 2:24 PM, Дилян Палаузов wrote: > /git/A/.git/worktrees/b/ is missing - that is the point. > /git/B/,git wasn't modified since the worktree was created, cat: > gitdir: /git/A/.git/worktrees/b I'll assume that the lowercase 'b' was a typo in your

Re: Worktree silently deleted on git fetch/gc/log

2018-03-01 Thread Дилян Палаузов
Hello, /git/A/.git/worktrees/b/ is missing - that is the point. /git/B/,git wasn't modified since the worktree was created, cat: gitdir: /git/A/.git/worktrees/b Regards Дилян On 03/01/18 19:09, Eric Sunshine wrote: On Wed, Feb 28, 2018 at 7:44 AM, Дилян Палаузов

Re: Worktree silently deleted on git fetch/gc/log

2018-03-01 Thread Eric Sunshine
On Wed, Feb 28, 2018 at 7:44 AM, Дилян Палаузов wrote: > A (branch master) and > B (branch g) which is a worktree of the first. > > /git/B g>$ git fetch > [...] > From https://... >13e4c55a0..02655d5fb g -> origin/g >c37a3ca25..bc7888511 master ->

Worktree silently deleted on git fetch/gc/log

2018-02-28 Thread Дилян Палаузов
Hello, with git 2.16.2 I have two repositories: A (branch master) and B (branch g) which is a worktree of the first. This has always forked fine until yesterday, when I did: /git/B g>$ git fetch remote: Counting objects: 29, done. remote: Compressing objects: 100% (6/6), done. remote: Total