Subject: Re: [PATCH] diff: don't read index when --no-index is given

From: Jonathan Nieder <[email-masked]>
Date: Mon, 9 Dec 2013 11:06:35 -0800

Jens Lehmann wrote:
> Am 09.12.2013 16:16, schrieb Jonathan Nieder:
>> Thomas Gummerer wrote:

>>> git diff --no-index ... currently reads the index, during setup, when
>>> calling gitmodules_config().  In the usual case this gives us some
>>> performance drawbacks,
>>
>> Makes sense.
>
> Hmm, but this will disable the submodule specific ignore configuration
> options defined in the .gitmodules file, no? (E.g. when diffing two
> directories containing submodules)

Yes.  That seems like a good behavior.

"git diff --no-index" was invented as just a fancy version of 'diff
-uR", without any awareness of the current git repository.  That means
that at least in principle, .gitmodules and .gitignore should not
affect it.

[...]
>                               Wouldn't adding a "gently" option (which
> could then warn instead of dying) to gitmodules_config() be a better
> solution here?

I don't think so.

Thanks and hope that helps,
Jonathan