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

2013-12-09 Thread Thomas Gummerer
git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). This results in worse performance when the index is not actually needed. This patch avoids calling gitmodules_config() when the --no-index option is given. The times for executing git diff

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

2013-12-09 Thread Torsten Bögershausen
On 2013-12-09 21.40, Thomas Gummerer wrote: +test_expect_success 'git diff --no-index with broken index' ' + cd repo + echo broken .git/index + git diff --no-index a ../non/git/a ^^ I'm confused: Does this work with the trailing ?

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

2013-12-09 Thread Eric Sunshine
On Mon, Dec 9, 2013 at 3:40 PM, Thomas Gummerer t.gumme...@gmail.com wrote: git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). This results in worse performance when the index is not actually needed. This patch avoids calling

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

2013-12-09 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes: On Mon, Dec 9, 2013 at 3:40 PM, Thomas Gummerer t.gumme...@gmail.com wrote: git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). This results in worse performance when the index is not actually