Re: [PATCH] diff: don't read index when --no-index is given
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Dec 9, 2013, 17:27 UTC
- Message-ID
- <52A5FD7A.9030801@web.de>
- In-Reply-To
- <20131209151609.GA14841@google.com>
Am 09.12.2013 16:16, schrieb Jonathan Nieder:
Show 7 quoted lines
> 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)
Show 7 quoted lines
>> but it's especially annoying if there is a broken >> index file. > > Is this really a normal case? It makes sense that as a side-effect it > is easier to use "git diff --no-index" as a general-purpose tool while > investigating a broken repo, but I would have thought that quickly > learning a repo is broken is a good thing in any case.
But I agree that dying with "index file corrupt" is a bit strange when calling diff with --no-index. Wouldn't adding a "gently" option (which could then warn instead of dying) to gitmodules_config() be a better solution here?