From: Junio C Hamano Date: Thu, 22 Mar 2018 21:24:11 +0000 (-0700) Subject: Merge branch 'ew/svn-branch-segfault-fix' into maint X-Git-Tag: v2.16.3~26 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/34b9ec8dd9bf6d3f6fa04f295351f917042a33fa?ds=inline;hp=-c Merge branch 'ew/svn-branch-segfault-fix' into maint Workaround for segfault with more recent versions of SVN. * ew/svn-branch-segfault-fix: git-svn: control destruction order to avoid segfault --- 34b9ec8dd9bf6d3f6fa04f295351f917042a33fa diff --combined git-svn.perl index 76a75d0b3d,b012980246..a6b6c3e40c --- a/git-svn.perl +++ b/git-svn.perl @@@ -931,7 -931,6 +931,7 @@@ sub cmd_dcommit # information from different SVN repos, and paths # which are not underneath this repository root. my $rooturl = $gs->repos_root; + Git::SVN::remove_username($rooturl); foreach my $d (@$linear_refs) { my %parentshash; read_commit_parents(\%parentshash, $d); @@@ -1200,6 -1199,11 +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; }