git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/4] difftool: silence uninitialized variable warning
@ 2013-02-21  4:03 David Aguilar
  2013-02-21  4:03 ` [PATCH 2/4] t7800: update copyright notice David Aguilar
  0 siblings, 1 reply; 55+ messages in thread
From: David Aguilar @ 2013-02-21  4:03 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jonathan Nieder

Git::config() returns `undef` when given keys that do not exist.
Check that the $guitool value is defined to prevent a noisy
"Use of uninitialized variable $guitool in length" warning.

Signed-off-by: David Aguilar <davvid@gmail.com>
---
Unchanged since v1.

 git-difftool.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-difftool.perl b/git-difftool.perl
index 0a90de4..12231fb 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -336,7 +336,7 @@ sub main
 	}
 	if ($opts{gui}) {
 		my $guitool = Git::config('diff.guitool');
-		if (length($guitool) > 0) {
+		if (defined($guitool) && length($guitool) > 0) {
 			$ENV{GIT_DIFF_TOOL} = $guitool;
 		}
 	}
-- 
1.8.2.rc0.20.gf548dd7

^ permalink raw reply related	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2013-03-26 21:02 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21  4:03 [PATCH v3 1/4] difftool: silence uninitialized variable warning David Aguilar
2013-02-21  4:03 ` [PATCH 2/4] t7800: update copyright notice David Aguilar
2013-02-21  4:03   ` [PATCH v3 3/4] t7800: modernize tests David Aguilar
2013-02-21  4:03     ` [PATCH v3 4/4] t7800: "defaults" is no longer a builtin tool name David Aguilar
2013-02-21  4:55       ` Junio C Hamano
2013-02-21  5:00       ` Junio C Hamano
2013-02-21 23:31         ` David Aguilar
2013-03-20  9:48     ` [PATCH v3 3/4] t7800: modernize tests Johannes Sixt
2013-03-20 22:59       ` David Aguilar
2013-03-21  7:41         ` Johannes Sixt
2013-03-22  7:13           ` Johannes Sixt
2013-03-22 10:00             ` John Keeping
2013-03-22 11:14               ` Johannes Sixt
2013-03-22 11:53                 ` John Keeping
2013-03-22 19:36                   ` [PATCH 0/3] Improve difftool --dir-diff tests John Keeping
2013-03-22 19:36                     ` [PATCH 1/3] t7800: don't hide grep output John Keeping
2013-03-22 22:32                       ` Johannes Sixt
2013-03-22 22:45                       ` Junio C Hamano
2013-03-22 19:36                     ` [PATCH 2/3] t7800: fix tests when difftool uses --no-symlinks John Keeping
2013-03-22 22:27                       ` Johannes Sixt
2013-03-22 22:53                       ` Junio C Hamano
2013-03-22 23:05                         ` John Keeping
2013-03-23  3:24                           ` David Aguilar
2013-03-22 19:36                     ` [PATCH 3/3] t7800: run --dir-diff tests with and without symlinks John Keeping
2013-03-22 21:05                       ` [PATCH 3/3 v2] " John Keeping
2013-03-23 13:31                     ` [PATCH v2 0/3] difftool --dir-diff test improvements John Keeping
2013-03-23 13:31                       ` [PATCH v2 1/3] t7800: don't hide grep output John Keeping
2013-03-23 13:31                       ` [PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks John Keeping
2013-03-24  5:19                         ` Junio C Hamano
2013-03-24 12:36                           ` John Keeping
2013-03-24 13:31                             ` Matt McClure
2013-03-24 15:15                               ` John Keeping
2013-03-25  7:41                                 ` Johannes Sixt
2013-03-25 10:42                                   ` John Keeping
2013-03-25 21:44                                     ` [PATCH v2] difftool: don't overwrite modified files John Keeping
2013-03-26  8:38                                       ` Johannes Sixt
2013-03-26  8:47                                         ` Johannes Sixt
2013-03-26  9:31                                         ` John Keeping
2013-03-26  9:53                                           ` Johannes Sixt
2013-03-26 19:34                                             ` John Keeping
2013-03-26 20:52                                       ` Matt McClure
2013-03-26 21:01                                         ` John Keeping
2013-03-25 16:15                                   ` [PATCH v2 2/3] t7800: fix tests when difftool uses --no-symlinks Junio C Hamano
2013-03-24 21:29                             ` David Aguilar
2013-03-25 10:57                               ` John Keeping
2013-03-25 14:54                               ` Junio C Hamano
2013-03-24 13:24                           ` Matt McClure
2013-03-24  6:20                         ` Eric Sunshine
2013-03-23 13:31                       ` [PATCH v2 3/3] t7800: run --dir-diff tests with and without symlinks John Keeping
2013-03-25  7:26                         ` Johannes Sixt
2013-03-25 10:35                           ` John Keeping
2013-03-25 10:59                             ` Johannes Sixt
2013-03-25 11:02                               ` John Keeping
2013-03-25 21:50                               ` Junio C Hamano
2013-03-26  9:22                                 ` John Keeping

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).