summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:16 (GMT)
commit9cd5320d3cfb2c2841a76b36b20c18e9299206ab (patch)
tree04e98bf78feaa7cd7166aceb62a2592645a86751
parent798224a1c97ccdeb5f80d97914c7447e356670ac (diff)
parent7f6f75e97acd25f8e95ce431e16d2e1c2093845d (diff)
downloadgit-9cd5320d3cfb2c2841a76b36b20c18e9299206ab.zip
git-9cd5320d3cfb2c2841a76b36b20c18e9299206ab.tar.gz
git-9cd5320d3cfb2c2841a76b36b20c18e9299206ab.tar.bz2
Merge branch 'ew/svn-branch-segfault-fix'
Workaround for segfault with more recent versions of SVN. * ew/svn-branch-segfault-fix: git-svn: control destruction order to avoid segfault
-rwxr-xr-xgit-svn.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 76a75d0..a6b6c3e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1200,6 +1200,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;
}