summaryrefslogtreecommitdiff
path: root/git-difftool.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-difftool.perl')
-rwxr-xr-xgit-difftool.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-difftool.perl b/git-difftool.perl
index 0a90de4146..3cab257595 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -209,7 +209,9 @@ EOF
delete($ENV{GIT_INDEX_FILE});
# Changes in the working tree need special treatment since they are
- # not part of the index
+ # not part of the index. Remove any trailing slash from $workdir
+ # before starting to avoid double slashes in symlink targets.
+ $workdir =~ s|/$||;
for my $file (@working_tree) {
my $dir = dirname($file);
unless (-d "$rdir/$dir") {