From: Ross Lagerwall <rosslagerwall@gmail.com>
To: git@vger.kernel.org
Cc: Ross Lagerwall <rosslagerwall@gmail.com>
Subject: [PATCH] difftool: silence warning
Date: Tue, 21 Aug 2012 12:21:40 +0200 [thread overview]
Message-ID: <1345544500-16277-1-git-send-email-rosslagerwall@gmail.com> (raw)
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>
---
git-difftool.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-difftool.perl b/git-difftool.perl
index 17d4de6..edd0493 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';
--
1.7.11.4
next reply other threads:[~2012-08-21 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 10:21 Ross Lagerwall [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-08-21 6:59 [PATCH] difftool: silence warning Ross Lagerwall
2012-08-21 9:04 ` David Aguilar
2012-08-21 9:42 ` Ross Lagerwall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345544500-16277-1-git-send-email-rosslagerwall@gmail.com \
--to=rosslagerwall@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).