Re: [PATCH] diff: do not reuse_worktree_file for submodules

2014-02-24 Thread Junio C Hamano
Thomas Rast writes: > I spoke too soon; it breaks the test I wrote to cover this case, for a > reason that gives me a headache. > > When we hit the conditional > - if (!one->sha1_valid || - reuse_worktree_file(name, one->sha1, 1)) { + if (!S_ISGITLINK(one->mode) && +

Re: [PATCH] diff: do not reuse_worktree_file for submodules

2014-02-23 Thread Thomas Rast
Thomas Rast writes: > Junio C Hamano writes: > >> Thomas Rast writes: >> >>> @@ -2845,8 +2845,9 @@ static struct diff_tempfile *prepare_temp_file(const >>> char *name, >>> remove_tempfile_installed = 1; >>> } >>> >>> - if (!one->sha1_valid || >>> - reuse_worktree_file

Re: [PATCH] diff: do not reuse_worktree_file for submodules

2014-02-22 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> @@ -2845,8 +2845,9 @@ static struct diff_tempfile *prepare_temp_file(const >> char *name, >> remove_tempfile_installed = 1; >> } >> >> -if (!one->sha1_valid || >> -reuse_worktree_file(name, one->sha1, 1)) { >> +

Re: [PATCH] diff: do not reuse_worktree_file for submodules

2014-02-18 Thread Junio C Hamano
Thomas Rast writes: > The GIT_EXTERNAL_DIFF calling code attempts to reuse existing worktree > files for the worktree side of diffs, for performance reasons. > However, that code also tries to do the same with submodules. This > results in calls to $GIT_EXTERNAL_DIFF where the old-file is a file

[PATCH] diff: do not reuse_worktree_file for submodules

2014-02-16 Thread Thomas Rast
The GIT_EXTERNAL_DIFF calling code attempts to reuse existing worktree files for the worktree side of diffs, for performance reasons. However, that code also tries to do the same with submodules. This results in calls to $GIT_EXTERNAL_DIFF where the old-file is a file of the form "Submodule commit