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

2014-02-24 Thread Junio C Hamano
Thomas Rast t...@thomasrast.ch 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 t...@thomasrast.ch writes: Junio C Hamano gits...@pobox.com writes: Thomas Rast t...@thomasrast.ch writes: @@ -2845,8 +2845,9 @@ static struct diff_tempfile *prepare_temp_file(const char *name, remove_tempfile_installed = 1; } - if (!one-sha1_valid || -

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

2014-02-22 Thread Thomas Rast
Junio C Hamano gits...@pobox.com writes: Thomas Rast t...@thomasrast.ch 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,

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

2014-02-18 Thread Junio C Hamano
Thomas Rast t...@thomasrast.ch 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

[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