aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/git.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-10 23:27:11 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-10-10 23:27:11 +0000
commiteec289e281c86fcaf290a5e22073a010d9c5a208 (patch)
tree6fab10b0c257980be076bb99b1d34eff2a9c2206 /IkiWiki/Rcs/git.pm
parent65d56aa012d7e241140e109176783ea0d23778bd (diff)
downloadikiwiki-eec289e281c86fcaf290a5e22073a010d9c5a208.tar
ikiwiki-eec289e281c86fcaf290a5e22073a010d9c5a208.tar.gz
* 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.
Diffstat (limited to 'IkiWiki/Rcs/git.pm')
-rw-r--r--IkiWiki/Rcs/git.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 070bf3208..38581ba67 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -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);
}