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

2018-10-01 Thread Stefan Beller
On Mon, Oct 1, 2018 at 8:45 AM Antonio Ospite wrote: > > On Thu, 27 Sep 2018 11:00:52 -0700 > Stefan Beller wrote: > > > On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: > [...] > > > OK, so the plan for v6 is: > > > > > > - avoid the corruption issues spotted by Gábor by removing the

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

2018-10-01 Thread Antonio Ospite
On Thu, 27 Sep 2018 11:00:52 -0700 Stefan Beller wrote: > On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: [...] > > OK, so the plan for v6 is: > > > > - avoid the corruption issues spotted by Gábor by removing the call > > to repo_read_gitmodules in builtin/grep.c (this still does

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

2018-09-27 Thread Stefan Beller
On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: > > If you end up touching get_oid() please CC me. noted. I am not sure I'll touch it anytime soon, though. > > Are you suggesting to look into super-prefix for any reason in > particular? No, I misread the intent of that part of your

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

2018-09-27 Thread Antonio Ospite
On Fri, 21 Sep 2018 09:19:45 -0700 Junio C Hamano wrote: > Antonio Ospite writes: > > > Protecting the problematic submodules function could work for now, but > > I'd like to have more comments, my proposal is: > > > > diff --git a/builtin/grep.c b/builtin/grep.c > > index

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

2018-09-27 Thread Antonio Ospite
Hi Stefan, On Mon, 24 Sep 2018 14:00:50 -0700 Stefan Beller wrote: > On Mon, Sep 24, 2018 at 3:20 AM Antonio Ospite wrote: > [...] > > This is a limitation of the object store in git, there is no equivalent > > of get_oid() to get the oid from a specific repository and this affects > >

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

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 3:20 AM Antonio Ospite wrote: > > The third call, however, looks at the nested submodule at > > 'submodule/sub', which doesn't contain a '.gitmodules' file. So this > > function goes on with the second condition and calls > > get_oid(GITMODULES_INDEX, ), which then

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

2018-09-24 Thread Antonio Ospite
On Tue, 18 Sep 2018 19:12:57 +0200 SZEDER Gábor wrote: [...] > On Mon, Sep 17, 2018 at 04:09:40PM +0200, Antonio Ospite wrote: > > When the .gitmodules file is not available in the working tree, try > > using the content from the index and from the current branch. > > "from the index and from

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

2018-09-21 Thread Junio C Hamano
Antonio Ospite writes: > Protecting the problematic submodules function could work for now, but > I'd like to have more comments, my proposal is: > > diff --git a/builtin/grep.c b/builtin/grep.c > index 601f801158..52b45de749 100644 > --- a/builtin/grep.c > +++ b/builtin/grep.c > @@ -427,6

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

2018-09-20 Thread Antonio Ospite
On Tue, 18 Sep 2018 19:12:57 +0200 SZEDER Gábor wrote: > Hi Antonio, > > it appears that this patch (and its previous versions as well) is > responsible for triggering occasional test failures in > 't7814-grep-recurse-submodules.sh', more frequently, about once in > every ten runs, on macOS on

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

2018-09-19 Thread Junio C Hamano
SZEDER Gábor writes: > it appears that this patch (and its previous versions as well) is > responsible for triggering occasional test failures in > 't7814-grep-recurse-submodules.sh', more frequently, about once in > every ten runs, on macOS on Travis CI, less frequently, about once in > a

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

2018-09-18 Thread SZEDER Gábor
Hi Antonio, it appears that this patch (and its previous versions as well) is responsible for triggering occasional test failures in 't7814-grep-recurse-submodules.sh', more frequently, about once in every ten runs, on macOS on Travis CI, less frequently, about once in a couple of hundred runs on

[PATCH v5 9/9] submodule: support reading .gitmodules when it's not in the working tree

2018-09-17 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