Merge branch 'tz/doc-git-urls-reference'
[gitweb.git] / git-svn.perl
index 76a75d0b3dfe36f0c82c3951f8b7b04849f808e1..050f2a36f414f147f3bde3cc9f69639d5a36a975 100755 (executable)
@@ -374,7 +374,8 @@ sub term_init {
 usage(1) unless defined $cmd;
 load_authors() if $_authors;
 if (defined $_authors_prog) {
-       $_authors_prog = "'" . File::Spec->rel2abs($_authors_prog) . "'";
+       my $abs_file = File::Spec->rel2abs($_authors_prog);
+       $_authors_prog = "'" . $abs_file . "'" if -x $abs_file;
 }
 
 unless ($cmd =~ /^(?:clone|init|multi-init|commit-diff)$/) {
@@ -1200,6 +1201,11 @@ sub cmd_branch {
        $ctx->copy($src, $rev, $dst)
                unless $_dry_run;
 
+       # Release resources held by ctx before creating another SVN::Ra
+       # so destruction is orderly.  This seems necessary with SVN 1.9.5
+       # to avoid segfaults.
+       $ctx = undef;
+
        $gs->fetch_all;
 }