Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
grep: rewrite an if/else condition to avoid duplicate expression
[gitweb.git]
/
git-difftool.perl
diff --git
a/git-difftool.perl
b/git-difftool.perl
index 7df7c8a9a7c889fbf5f0b2d6e67be66bf6fea6b1..488d14b153e50f69fcfb0c732cc8c23cf4b643de 100755
(executable)
--- 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);
}