Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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>
  • Loading branch information...
commit ed36e5bd41f7192e42e9b4c573875a343a9daf48 1 parent 755e8b3
@rosslagerwall rosslagerwall authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  git-difftool.perl
View
2  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';

0 comments on commit ed36e5b

Please sign in to comment.
Something went wrong with that request. Please try again.