From 89764f5d8b0ca8600e3a200e9f863c3c7a3ff5e8 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Mon, 10 Oct 2005 11:15:09 +0200 Subject: [PATCH] cvsimport: report merge parents Matching and reporting merge parents happens in a subprocess. Re-open stdout before redirecting stdout to the pipe, so that printing verbose messages doesn't go to the wrong place. Signed-Off-By: Matthias Urlichs --- git-cvsimport.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index f35c0d04..cc0eed29 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -567,6 +567,7 @@ my $commit = sub { unless($pid) { $pr->writer(); $pw->reader(); + open(OUT,">&STDOUT"); dup2($pw->fileno(),0); dup2($pr->fileno(),1); $pr->close(); @@ -584,10 +585,9 @@ my $commit = sub { if ( -e "$git_dir/refs/heads/$mparent") { $mparent = get_headref($mparent, $git_dir); push @par, '-p', $mparent; - # printing here breaks import # - # # print "Merge parent branch: $mparent\n" if $opt_v; + print OUT "Merge parent branch: $mparent\n" if $opt_v; } - } + } } exec("env", -- 2.11.0