Skip to content

Commit ed36e5b

Browse files
rosslagerwallgitster
authored andcommitted
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 <[email protected]> Acked-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 755e8b3 commit ed36e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-difftool.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ sub setup_dir_diff
138138

139139
my @gitargs = ('diff', '--raw', '--no-abbrev', '-z', @ARGV);
140140
my $diffrtn = $diffrepo->command_oneline(@gitargs);
141-
exit(0) if (length($diffrtn) == 0);
141+
exit(0) unless defined($diffrtn);
142142

143143
# Build index info for left and right sides of the diff
144144
my $submodule_mode = '160000';

0 commit comments

Comments
 (0)