Re: [PATCH/POC 3/7] setup.c: add split-repo support to .git files

2013-12-22 Thread Duy Nguyen
On Sat, Dec 14, 2013 at 3:43 AM, Jonathan Nieder wrote: > Problems: > > * What if I move my worktree with "mv"? Then I still need the >corresponding $GIT_SUPER_DIR/repos/ directory, and nobody told >the GIT_SUPER_DIR about it. > > * What if my worktree is on removable media (think "netw

Re: [PATCH/POC 3/7] setup.c: add split-repo support to .git files

2013-12-13 Thread Duy Nguyen
On Sat, Dec 14, 2013 at 3:43 AM, Jonathan Nieder wrote: > Junio C Hamano wrote: > >> - Do we want to record where the working tree directory is in >>$GIT_SUPER_DIR/repos/ somewhere? Would it help to have such >>a record? > > That could be nice for the purpose of garbage collecting them.

Re: [PATCH/POC 3/7] setup.c: add split-repo support to .git files

2013-12-13 Thread Jonathan Nieder
Junio C Hamano wrote: > - Do we want to record where the working tree directory is in >$GIT_SUPER_DIR/repos/ somewhere? Would it help to have such >a record? That could be nice for the purpose of garbage collecting them. I fear that for users it is too tempting to remove a worktree wit

Re: [PATCH/POC 3/7] setup.c: add split-repo support to .git files

2013-12-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > If a .git file contains > > gitsuper: > gitdir: > > then we set GIT_SUPER_DIR to and GIT_DIR to > $GIT_SUPER_DIR/repos/. I initially thought: "what is with that complexity? isn't it just the matter of replacing 'gitdir: ' with 'gitsuper: ' stored in the file .g

[PATCH/POC 3/7] setup.c: add split-repo support to .git files

2013-12-11 Thread Nguyễn Thái Ngọc Duy
If a .git file contains gitsuper: gitdir: then we set GIT_SUPER_DIR to and GIT_DIR to $GIT_SUPER_DIR/repos/. Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 1 + setup.c | 40 +--- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/cache.h