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

2013-12-10 Thread Thomas Gummerer
Jonathan Nieder writes: > Thomas Gummerer wrote: > >> --- a/builtin/diff.c >> +++ b/builtin/diff.c >> @@ -295,7 +295,9 @@ int cmd_diff(int argc, const char **argv, const char >> *prefix) >> break; >> } >> >> -prefix = setup_git_directory_gently(&nongit); >> +if

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

2013-12-10 Thread Jonathan Nieder
Thomas Gummerer wrote: > --- a/builtin/diff.c > +++ b/builtin/diff.c > @@ -295,7 +295,9 @@ int cmd_diff(int argc, const char **argv, const char > *prefix) > break; > } > > - prefix = setup_git_directory_gently(&nongit); > + if (!no_index) > + pref

[PATCH v3 2/2] diff: don't read index when --no-index is given

2013-12-10 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 --no-in