Code

Add support for url aliases in config files
[git.git] / git-cvsserver.perl
index 11f5127ce95a376200c12b7a620546e957dfac56..afe3d0b7fe4d643688e672f62844cc86ec64fab5 100755 (executable)
@@ -1357,6 +1357,12 @@ sub req_ci
                close $pipe || die "bad pipe: $! $?";
        }
 
+       ### Then hooks/post-update
+       $hook = $ENV{GIT_DIR}.'hooks/post-update';
+       if (-x $hook) {
+               system($hook, "refs/heads/$state->{module}");
+       }
+
     $updater->update();
 
     # foreach file specified on the command line ...
@@ -2537,8 +2543,15 @@ 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;