Merge branch 'jk/difftool-in-subdir' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Jan 2017 23:11:08 +0000 (15:11 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jan 2017 23:14:40 +0000 (15:14 -0800)
Even though an fix was attempted in Git 2.9.3 days, but running
"git difftool --dir-diff" from a subdirectory never worked. This
has been fixed.

* jk/difftool-in-subdir:
difftool: rename variables for consistency
difftool: chdir as early as possible
difftool: sanitize $workdir as early as possible
difftool: fix dir-diff index creation when in a subdirectory

1  2 
git-difftool.perl
index 959822d5f31f60c3b3366292c973e26f0948c45a,4e4f5d8138a68e52e5ec0b787c1d7a09ba3e6658..e26294feab988d1bfc15d10acbe2774b29b5ec6f
@@@ -182,10 -188,6 +188,10 @@@ EO
                }
        }
  
-       chdir($workdir);
 +      # Go to the root of the worktree so that the left index files
 +      # are properly setup -- the index is toplevel-relative.
++      chdir($worktree);
 +
        # Setup temp directories
        my $tmpdir = tempdir('git-difftool.XXXXX', CLEANUP => 0, TMPDIR => 1);
        my $ldir = "$tmpdir/left";