Re: [PATCH] diff: don't read index when --no-index is given
From: Jens Lehmann <hidden>
Date: 2016-06-15 22:59:25
Am 09.12.2013 16:16, schrieb Jonathan Nieder:
Thomas Gummerer wrote:quoted
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)
quoted
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?