Re: [PATCH] diff: don't read index when --no-index is given
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 9, 2013, 19:06 UTC
- Message-ID
- <20131209190635.GQ29959@google.com>
- In-Reply-To
- <52A5FD7A.9030801@web.de>
Jens Lehmann wrote:
> Am 09.12.2013 16:16, schrieb Jonathan Nieder: >> Thomas Gummerer wrote:
Show 9 quoted lines
>>> 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