From: Ross Lagerwall Date: Tue, 21 Aug 2012 10:21:40 +0000 (+0200) Subject: difftool: silence warning X-Git-Tag: v1.8.0-rc0~129^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed36e5bd41f7192e42e9b4c573875a343a9daf48;p=git.git 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 Acked-by: David Aguilar Signed-off-by: Junio C Hamano --- diff --git a/git-difftool.perl b/git-difftool.perl index 17d4de661..edd0493a0 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';