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>

Ross Lagerwall committed Aug 21, 2012 at 12:21 UTC ed36e5bd41f7192e42e9b4c573875a343a9daf48
1 file changed +1 -1
git-difftool.perl
+1 -1
@@ -138,7 +138,7 @@ sub setup_dir_diff
138
139 my @gitargs = ('diff', '--raw', '--no-abbrev', '-z', @ARGV);
140 my $diffrtn = $diffrepo->command_oneline(@gitargs);
141 - exit(0) if (length($diffrtn) == 0);
141 + exit(0) unless defined($diffrtn);
142
143 # Build index info for left and right sides of the diff
144 my $submodule_mode = '160000';