Merge branch 'jc/pull-rebase-ff'
[gitweb.git] / git-difftool.perl
index a5790d03a075884ffe93dbff782b28ec87263051..959822d5f31f60c3b3366292c973e26f0948c45a 100755 (executable)
@@ -182,6 +182,10 @@ sub setup_dir_diff
                }
        }
 
+       # Go to the root of the worktree so that the left index files
+       # are properly setup -- the index is toplevel-relative.
+       chdir($workdir);
+
        # Setup temp directories
        my $tmpdir = tempdir('git-difftool.XXXXX', CLEANUP => 0, TMPDIR => 1);
        my $ldir = "$tmpdir/left";