git-p4: Unset P4DIFF environment variable when using 'p4 -du diff'
[gitweb.git] / git-cvsserver.perl
index ecded3b9cba9e18117f7372af37e9b56203a6fcf..7f632af20defd7a3cfd92008c51f7e599be13830 100755 (executable)
@@ -2543,13 +2543,20 @@ sub update
                     if ($parent eq $lastpicked) {
                         next;
                     }
-                    my $base = safe_pipe_capture('git-merge-base',
+                   my $base = eval {
+                           safe_pipe_capture('git-merge-base',
                                                 $lastpicked, $parent);
+                   };
+                   # The two branches may not be related at all,
+                   # in which case merge base simply fails to find
+                   # any, but that's Ok.
+                   next if ($@);
+
                     chomp $base;
                     if ($base) {
                         my @merged;
                         # print "want to log between  $base $parent \n";
-                        open(GITLOG, '-|', 'git-log', "$base..$parent")
+                        open(GITLOG, '-|', 'git-log', '--pretty=medium', "$base..$parent")
                          or die "Cannot call git-log: $!";
                         my $mergedhash;
                         while (<GITLOG>) {