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 jrnie...@gmail.com wrote: Problems: * What if I move my worktree with mv? Then I still need the corresponding $GIT_SUPER_DIR/repos/id directory, and nobody told the GIT_SUPER_DIR about it. * What if my worktree is on removable media

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 pclo...@gmail.com writes: If a .git file contains gitsuper: path gitdir: id then we set GIT_SUPER_DIR to path and GIT_DIR to $GIT_SUPER_DIR/repos/id. I initially thought: what is with that complexity? isn't it just the matter of replacing 'gitdir: path' with

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/id 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

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 jrnie...@gmail.com wrote: Junio C Hamano wrote: - Do we want to record where the working tree directory is in $GIT_SUPER_DIR/repos/id somewhere? Would it help to have such a record? That could be nice for the purpose of garbage

[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: path gitdir: id then we set GIT_SUPER_DIR to path and GIT_DIR to $GIT_SUPER_DIR/repos/id. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + setup.c | 40 +--- 2 files changed, 34 insertions(+), 7