提交 ed36e5bd 编写于 作者: R Ross Lagerwall 提交者: Junio C Hamano

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: NRoss Lagerwall <rosslagerwall@gmail.com>
Acked-by: NDavid Aguilar <davvid@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 755e8b3f
......@@ -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';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册