Re: [PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-10 Thread Stefan Beller
On Wed, Oct 10, 2018 at 11:56 AM Antonio Ospite wrote: > > On Mon, 8 Oct 2018 15:19:00 -0700 > Stefan Beller wrote: > > > > +test_expect_success 'not writing gitmodules config file when it is not > > > checked out' ' > > > +test_must_fail git -C super submodule--helper config > > >

Re: [PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-10 Thread Antonio Ospite
On Mon, 8 Oct 2018 15:19:00 -0700 Stefan Beller wrote: > > +test_expect_success 'not writing gitmodules config file when it is not > > checked out' ' > > +test_must_fail git -C super submodule--helper config > > submodule.submodule.url newurl > > This only checks the exit code, do we

Re: [PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-08 Thread Junio C Hamano
Junio C Hamano writes: > Antonio Ospite writes: > >> Finally, add t7416-submodule-sparse-gitmodules.sh to verify that reading >> from .gitmodules succeeds and that writing to it fails when the file is >> not checked out. >> ... >> t/t7416-submodule-sparse-gitmodules.sh | 78

Re: [PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-08 Thread Junio C Hamano
Antonio Ospite writes: > Finally, add t7416-submodule-sparse-gitmodules.sh to verify that reading > from .gitmodules succeeds and that writing to it fails when the file is > not checked out. > ... > t/t7416-submodule-sparse-gitmodules.sh | 78 ++ This now triggers

Re: [PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-08 Thread Stefan Beller
> +test_expect_success 'not writing gitmodules config file when it is not > checked out' ' > +test_must_fail git -C super submodule--helper config > submodule.submodule.url newurl This only checks the exit code, do we also want to check for test_path_is_missing .gitmodules ? >

[PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-05 Thread Antonio Ospite
When the .gitmodules file is not available in the working tree, try using the content from the index and from the current branch. This covers the case when the file is part of the repository but for some reason it is not checked out, for example because of a sparse checkout. This makes it