git svn exits with error error closing pipe: Bad file descriptor

From: Kacper Kornet <hidden>
Date: 2016-06-15 22:58:12

After upgrade to subversion 1.8.0 on some repositories
git svn clone shows two warnings:

error closing pipe: Bad file descriptor at
/home/users/kornet/giti/libexec/git-core/git-svn line 0.

at exit. They appear because process git cat-file --batch exits before
command_close_bidi_pipe is called by destructor during perl exit.  The
solution is to call the destructor explicitly, e.q.:

index ff1ce3d..6811738 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2068,6 +2068,10 @@ sub gc_directory {
        }
 }
 
+END {
+    undef $_repository;
+}
+
 __END__
 
 Data structures:
However I'm not sure whether it is not a symptom of some other error.
What's confuses me more is that the warnings don't appear for all
repositories. For example they appear for  http://svn.pld-linux.org/svn/cdpl/
while cloning http://svn.pld-linux.org/svn/atob ends normally.
On the other hand it is consistent between two different machines with
different Linux distributions and perl versions.

-- 
  Kacper Kornet
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help