From: Uma Srinivasan Date: Tue, 30 Aug 2016 00:12:28 GMT Subject: Re: git submodules implementation question Message-ID: In-Reply-To: This is great! Thanks Jake. If you happen to have the patch ID it would be helpful. Uma On Mon, Aug 29, 2016 at 5:02 PM, Jacob Keller wrote: > On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: >> Uma Srinivasan writes: >>> This fixes my issue but what do you think? Is this the right way to >>> fix it? Is there a better way? >> >> I think we already have a helper function that does a lot better >> than "does it have a file called HEAD" to ask "is this a git >> directory?" and its name I think is "is_git_directory" (I know, we >> are not imaginative when naming our functions). >> >> As to the check makes sense in the context of this function, I am >> not an expert to judge. I'd expect Jens, Heiko and/or Stefan to >> know better than I do. > > One of my patches adds a "is_git_directory()" call to this, and if we > fail falls back to checking the .gitmodules and git-config for > information regarding the submodule should it no longer be checked > out. I suspect this patch will address your concern. > > Thanks, > Jake