diff options
| author | Junio C Hamano <gitster@pobox.com> | 2015-12-04 11:34:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2015-12-04 11:34:24 -0800 |
| commit | aa0b4c31d9f21b806253ac16e59de82e2a5ec00e (patch) | |
| tree | ba3f9fa7ade4c73e61ea6bc330c4c3bad68794b5 /git-difftool.perl | |
| parent | Merge branch 'dk/gc-idx-wo-pack' into maint (diff) | |
| parent | difftool: ignore symbolic links in use_wt_file (diff) | |
| download | git-aa0b4c31d9f21b806253ac16e59de82e2a5ec00e.tar.gz git-aa0b4c31d9f21b806253ac16e59de82e2a5ec00e.zip | |
Merge branch 'da/difftool' into maint
The code to prepare the working tree side of temporary directory
for the "dir-diff" feature forgot that symbolic links need not be
copied (or symlinked) to the temporary area, as the code already
special cases and overwrites them. Besides, it was wrong to try
computing the object name of the target of symbolic link, which may
not even exist or may be a directory.
* da/difftool:
difftool: ignore symbolic links in use_wt_file
Diffstat (limited to 'git-difftool.perl')
| -rwxr-xr-x | git-difftool.perl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/git-difftool.perl b/git-difftool.perl index 7df7c8a9a7..488d14b153 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -70,9 +70,7 @@ sub use_wt_file my ($repo, $workdir, $file, $sha1) = @_; my $null_sha1 = '0' x 40; - if (! -e "$workdir/$file") { - # If the file doesn't exist in the working tree, we cannot - # use it. + if (-l "$workdir/$file" || ! -e _) { return (0, $null_sha1); } |
