Re: [PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-24 Thread Duy Nguyen
On Sat, Sep 24, 2016 at 11:55:33AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > I think this 4/3 is not quite enough to fix the damage to the code > > caused by 2/3. > > ... > > after 4/3 is applied, we should be able to remove the global > > variable 2/3

Re: [PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-24 Thread Junio C Hamano
Junio C Hamano writes: > I think this 4/3 is not quite enough to fix the damage to the code > caused by 2/3. > ... > after 4/3 is applied, we should be able to remove the global > variable 2/3 introduced, make init_db() receive that information as > the return value of

Re: [PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > I think a separate commit for this is better than combining back to > 2/3 so we can explain the problem properly (without making 2/3 commit > message even longer) > > Not sure if you want to s/contains/contain/ in 2/3 by yourself or I >

Re: [PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > I think a separate commit for this is better than combining back to > 2/3 so we can explain the problem properly (without making 2/3 commit > message even longer) > > Not sure if you want to s/contains/contain/ in 2/3 by yourself or I >

[PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-23 Thread Nguyễn Thái Ngọc Duy
Commit "init: do not set core.worktree more often than necessary" adds a subtle dependency between set_git_dir_init() and init_db(). The former _must_ be called before init_db() so that original_git_dir can be set properly. If something else, like enter_repo() or setup_git_directory(), is used