]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Fix strange stderr-hiding code in the git module, allow error messages
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 10 Oct 2007 23:27:11 +0000 (23:27 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 10 Oct 2007 23:27:11 +0000 (23:27 +0000)
  to be passed on to stderr. Also fixes a potential bug, since git error
  meesages were treated as if they came from git stdout.

IkiWiki/Rcs/git.pm
debian/changelog

index 070bf3208287bd52634bfe3d8c5dca513e20f6e8..38581ba679040081aa4d7b6f430c5784e04e8aa4 100644 (file)
@@ -23,8 +23,6 @@ sub _safe_git (&@) { #{{{
 
        if (!$pid) {
                # In child.
-               open STDERR, ">&STDOUT"
-                   or error("Cannot dup STDOUT: $!");
                # Git commands want to be in wc.
                chdir $config{srcdir}
                    or error("Cannot chdir to $config{srcdir}: $!");
@@ -40,7 +38,7 @@ sub _safe_git (&@) { #{{{
 
        close $OUT;
 
-       ($error_handler || sub { })->("'@cmdline' failed: $!") if $?;
+       $error_handler->("'@cmdline' failed: $!") if $? && $error_handler;
 
        return wantarray ? @lines : ($? == 0);
 }
index 138412216fffaeeb9aa4cea71cf3294501161063..0b3b79d3f4e492d3616c52850a829cf89fddff96 100644 (file)
@@ -11,8 +11,11 @@ ikiwiki (2.10) UNRELEASED; urgency=low
     it, and then the failing cgi choked on the new file when _it_ tried to
     render it. Ensuring that the index file is loaded after taking the lock
     will avoid this bug.
+  * Fix strange stderr-hiding code in the git module, allow error messages
+    to be passed on to stderr. Also fixes a potential bug, since git error
+    meesages were treated as if they came from git stdout.
 
- -- Joey Hess <joeyh@debian.org>  Wed, 10 Oct 2007 14:36:38 -0400
+ -- Joey Hess <joeyh@debian.org>  Wed, 10 Oct 2007 19:23:40 -0400
 
 ikiwiki (2.9) unstable; urgency=low