On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Uma Srinivasan <usriniva...@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.


Reply via email to