Merge branch 'mh/status-optionally-refresh'
[gitweb.git] / git-difftool.perl
index d975d072dbf0fab36266c3f3a71a69875206e4d8..adc42de8752fd395707f1e395c61991b3146cebb 100755 (executable)
@@ -78,11 +78,13 @@ sub generate_command
                        next;
                }
                if ($arg eq '-g' || $arg eq '--gui') {
-                       my $tool = Git::command_oneline('config',
-                                                       'diff.guitool');
-                       if (length($tool)) {
-                               $ENV{GIT_DIFF_TOOL} = $tool;
-                       }
+                       eval {
+                               my $tool = Git::command_oneline('config',
+                                                               'diff.guitool');
+                               if (length($tool)) {
+                                       $ENV{GIT_DIFF_TOOL} = $tool;
+                               }
+                       };
                        next;
                }
                if ($arg eq '-y' || $arg eq '--no-prompt') {