Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-11-03 Thread Max Kirillov
On Mon, Nov 03, 2014 at 07:54:39PM +0700, Duy Nguyen wrote: > Ping.. any idea how to go from here.. I'm sorry, I happen to have little time since the last conversation. As far as I understand, my patches are correct about handling existing submodules, but they may be not enough regarding _initial

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-11-03 Thread Jens Lehmann
Am 03.11.2014 um 13:54 schrieb Duy Nguyen: Ping.. any idea how to go from here.. I didn't dig deep enough into the multiple worktrees topic to know what "$MAIN_REPO/.git/worktrees/$WORKTREE/modules/$SUB" might mean, but a submodule whose repo lives under .git/modules/$SUBMODULE_NAME should have

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-11-03 Thread Duy Nguyen
Ping.. any idea how to go from here.. On Mon, Oct 20, 2014 at 11:11 AM, Max Kirillov wrote: > On Sun, Oct 19, 2014 at 09:30:15PM +0200, Jens Lehmann wrote: >> Am 16.10.2014 um 22:54 schrieb Max Kirillov: >>> On Wed, Oct 15, 2014 at 08:57:20PM +0200, Jens Lehmann wrote: Am 15.10.2014 um 00:15

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-19 Thread Max Kirillov
On Sun, Oct 19, 2014 at 09:30:15PM +0200, Jens Lehmann wrote: > Am 16.10.2014 um 22:54 schrieb Max Kirillov: >> On Wed, Oct 15, 2014 at 08:57:20PM +0200, Jens Lehmann wrote: >>> Am 15.10.2014 um 00:15 schrieb Max Kirillov: I think the logic can be simple: it a submodule is not checked-out

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-19 Thread Jens Lehmann
Am 17.10.2014 um 11:14 schrieb Duy Nguyen: On Thu, Oct 16, 2014 at 12:09 AM, Junio C Hamano wrote: Hmph. I was hoping that the multiple-work-trees topic was ready for 'next' by now, but we may want to wait to see how the interaction with submodule plays out to have another chance of a clean re

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-19 Thread Jens Lehmann
Am 16.10.2014 um 22:54 schrieb Max Kirillov: On Wed, Oct 15, 2014 at 08:57:20PM +0200, Jens Lehmann wrote: Am 15.10.2014 um 00:15 schrieb Max Kirillov: I think the logic can be simple: it a submodule is not checked-out in the repository "checkout --to" is called from, then it is not checked-out

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-17 Thread Duy Nguyen
On Thu, Oct 16, 2014 at 12:09 AM, Junio C Hamano wrote: > Hmph. I was hoping that the multiple-work-trees topic was ready for > 'next' by now, but we may want to wait to see how the interaction > with submodule plays out to have another chance of a clean reroll > before it happens. This is a top

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-16 Thread Max Kirillov
On Wed, Oct 15, 2014 at 08:57:20PM +0200, Jens Lehmann wrote: > Am 15.10.2014 um 00:15 schrieb Max Kirillov: >> I think the logic can be simple: it a submodule is not >> checked-out in the repository "checkout --to" is called >> from, then it is not checked-out to the new one also. If it >> is, the

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Jens Lehmann
Am 15.10.2014 um 00:15 schrieb Max Kirillov: On Tue, Oct 14, 2014 at 09:51:22PM +0200, Jens Lehmann wrote: Am 14.10.2014 um 20:34 schrieb Max Kirillov: But here are a lot of nuances. For example, it makes sense to have a superproject checkout without submodules being initialized (so that they d

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Oct 15, 2014 at 3:31 AM, Max Kirillov wrote: >> On Tue, Oct 14, 2014 at 07:09:45PM +0200, Jens Lehmann wrote: >>> Until that problem is solved it looks wrong to pass >>> GIT_COMMON_DIR into submodule recursion, I believe >>> GIT_COMMON_DIR should be added to the loca

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Duy Nguyen
On Wed, Oct 15, 2014 at 5:15 AM, Max Kirillov wrote: >> Hmm, so I tend towards adding GIT_COMMON_DIR to >> local_repo_env until we figured out how to handle this. >> Without that I fear bad things will happen, at least for a >> superproject with multiple checkout-to work trees where >> the same su

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-15 Thread Duy Nguyen
On Wed, Oct 15, 2014 at 3:31 AM, Max Kirillov wrote: > On Tue, Oct 14, 2014 at 07:09:45PM +0200, Jens Lehmann wrote: >> Until that problem is solved it looks wrong to pass >> GIT_COMMON_DIR into submodule recursion, I believe >> GIT_COMMON_DIR should be added to the local_repo_env array >> (and ev

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Max Kirillov
On Tue, Oct 14, 2014 at 09:51:22PM +0200, Jens Lehmann wrote: > Am 14.10.2014 um 20:34 schrieb Max Kirillov: >> But here are a lot of nuances. For example, it makes >> sense to have a superproject checkout without submodules >> being initialized (so that they don't waste space and >> machine time f

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Max Kirillov
On Tue, Oct 14, 2014 at 07:09:45PM +0200, Jens Lehmann wrote: > Until that problem is solved it looks wrong to pass > GIT_COMMON_DIR into submodule recursion, I believe > GIT_COMMON_DIR should be added to the local_repo_env array > (and even if it is passed on later, we might have to > append "/mod

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Jens Lehmann
Am 14.10.2014 um 20:34 schrieb Max Kirillov: On Tue, Oct 14, 2014 at 10:26:42AM -0700, Junio C Hamano wrote: And multiple-worktree _is_ about keeping the same repository and history data (i.e. object database, refs, rerere database, reflogs for refs/*) only once, while allowing multiple working

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Max Kirillov
On Tue, Oct 14, 2014 at 10:26:42AM -0700, Junio C Hamano wrote: > And multiple-worktree _is_ about keeping the same repository and > history data (i.e. object database, refs, rerere database, reflogs for > refs/*) only once, while allowing multiple working trees attached to > that single copy. > >

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Junio C Hamano
Jens Lehmann writes: > But I can't see how that can work by just sharing the modules directory > tree, as that contains work tree related files - e.g. the index - for > each submodule. AFAICS sharing them between work trees will work only > if the content of the modules directory is partly presen

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Jens Lehmann
Am 14.10.2014 um 14:17 schrieb Duy Nguyen: On Sun, Oct 12, 2014 at 12:13 PM, Max Kirillov wrote: These are fixes of issues with submodules with use of multiple working trees. I think the patches look fine from the nd/multiple-work-trees writer's perspective. I know too little about submodules

Re: [PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-14 Thread Duy Nguyen
On Sun, Oct 12, 2014 at 12:13 PM, Max Kirillov wrote: > These are fixes of issues with submodules with use of multiple working > trees. I think the patches look fine from the nd/multiple-work-trees writer's perspective. I know too little about submodules to judge if this is the right way and not

[PATCH 0/4] Multiple worktrees vs. submodules fixes

2014-10-11 Thread Max Kirillov
Hi. These are fixes of issues with submodules with use of multiple working trees. To be applied on top of the $gmane/257559, (6b4ce012cb in current pu). Max Kirillov (4): checkout: do not fail if target is an empty directory submodule refactor: use git_path_submodule() in add_submodule_odb()