Re: git submodules implementation question
- From
- Uma Srinivasan <usrinivasan@twitter.com>
- Date
- Aug 30, 2016, 00:12 UTC
- Message-ID
- <CAN5XQfsv+BEYDWR6Xjs4mCtYDVR12a2UzB1-_H4A_xfjUUOe2g@mail.gmail.com>
- In-Reply-To
- <CA+P7+xosGg955msq-gyKz_HyCZf7fPFQJdKZ3P8U3+poBBfuWA@mail.gmail.com>
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 <jacob.keller@gmail.com> wrote:
Show 21 quoted lines
> On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Uma Srinivasan <usrinivasan@twitter.com> 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