From: Matthias Urlichs Date: Mon, 10 Oct 2005 09:15:09 +0000 (+0200) Subject: cvsimport: report merge parents X-Git-Tag: v0.99.9~112^2~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=89764f5d8b0ca8600e3a200e9f863c3c7a3ff5e8;p=git.git 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 --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index f35c0d045..cc0eed294 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",