summaryrefslogtreecommitdiff
path: root/git-difftool.perl
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2012-08-21 12:21:40 +0200
committerJunio C Hamano <gitster@pobox.com>2012-08-21 15:27:15 -0700
commited36e5bd41f7192e42e9b4c573875a343a9daf48 (patch)
treeb2f2acd049dd5e43d1a5754ba41de65196eb9953 /git-difftool.perl
parent755e8b3f35e3991a735a6be740eda4567d45a741 (diff)
downloadgit-ed36e5bd41f7192e42e9b4c573875a343a9daf48.tar.gz
difftool: silence warning
Silence a warning given when running git difftool --dir-diff and there are no changes. This is because command_oneline returns undef when the command has no output, not ''. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-difftool.perl')
-rwxr-xr-xgit-difftool.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-difftool.perl b/git-difftool.perl
index 17d4de6618..edd0493a08 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -138,7 +138,7 @@ sub setup_dir_diff
my @gitargs = ('diff', '--raw', '--no-abbrev', '-z', @ARGV);
my $diffrtn = $diffrepo->command_oneline(@gitargs);
- exit(0) if (length($diffrtn) == 0);
+ exit(0) unless defined($diffrtn);
# Build index info for left and right sides of the diff
my $submodule_mode = '160000';