summaryrefslogtreecommitdiff
path: root/devel/git-base
diff options
context:
space:
mode:
authorwiz <wiz>2014-01-14 18:49:55 +0000
committerwiz <wiz>2014-01-14 18:49:55 +0000
commitfe88f62e6b79cd0b564ec48a0e36c769efdac5b2 (patch)
treee18eb7f04fb16696265088a98f8bb1d47ddc97e3 /devel/git-base
parent5b810ade327a8324182587123f5ac644103082b5 (diff)
downloadpkgsrc-fe88f62e6b79cd0b564ec48a0e36c769efdac5b2.tar.gz
Add a patch from the git mailing list fixing a problem with 'git svn':
git-svn: workaround for a bug in svn serf backend Subversion serf backend in versions 1.8.5 and below has a bug that the function creating the descriptor of a file change -- add_file() -- doesn't make a copy of its 3d argument when storing it on the returned descriptor. As a result, by the time this field is used (in transactions of file copying or renaming) it may well be released. This patch works around this bug, by storing the value to be passed as the 3d argument to add_file() in a local variable with the same scope as the file change descriptor, making sure their lifetime is the same. Cc: Benjamin Pabst <benjamin.pabst85 <at> gmail.com> Cc: Eric Wong <normalperson <at> yhbt.net> Signed-off-by: Roman Kagan <rkagan <at> mail.ru> --- perl/Git/SVN/Editor.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) http://permalink.gmane.org/gmane.comp.version-control.git/239690
Diffstat (limited to 'devel/git-base')
-rw-r--r--devel/git-base/Makefile4
-rw-r--r--devel/git-base/distinfo3
-rw-r--r--devel/git-base/patches/patch-perl_Git_SVN_Editor.pm51
3 files changed, 55 insertions, 3 deletions
diff --git a/devel/git-base/Makefile b/devel/git-base/Makefile
index de9258e48c9..1ca31656216 100644
--- a/devel/git-base/Makefile
+++ b/devel/git-base/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.7 2013/12/09 14:17:42 obache Exp $
+# $NetBSD: Makefile,v 1.8 2014/01/14 18:49:55 wiz Exp $
.include "../../devel/git/Makefile.common"
PKGNAME= git-base-${GIT_VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= GIT Tree History Storage Tool (base package)
CONFLICTS+= scmgit-base-[0-9]*
diff --git a/devel/git-base/distinfo b/devel/git-base/distinfo
index 63c9c323bb2..f2ed8051681 100644
--- a/devel/git-base/distinfo
+++ b/devel/git-base/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2014/01/01 16:05:51 bsiegert Exp $
+$NetBSD: distinfo,v 1.9 2014/01/14 18:49:55 wiz Exp $
SHA1 (git-1.8.5.2.tar.gz) = 3a09d6d5d4e31c702f17e664a527b4c2f6e84faf
RMD160 (git-1.8.5.2.tar.gz) = 0bbfd241bdb60c3b5e2ca74c06257187f9427b91
@@ -12,4 +12,5 @@ SHA1 (patch-ah) = f22a2160631fb624e9e20616c68ad1a4aa2bebc7
SHA1 (patch-ai) = 56b63d4790a11f5eb128186ad5efdd1bcf102f2e
SHA1 (patch-config.mak.uname) = 6321f0e0d941d04fdd378b2341c2ba1c938441a3
SHA1 (patch-git-compat-util.h) = 788800c9972faadef40ad7ef795ed72305bfa292
+SHA1 (patch-perl_Git_SVN_Editor.pm) = 50721693d2a23ff7f8d19db49f2427dbf446eee5
SHA1 (patch-wrapper.c) = d8252c63cca9a134fca3f8f6f28663f563c7b4bc
diff --git a/devel/git-base/patches/patch-perl_Git_SVN_Editor.pm b/devel/git-base/patches/patch-perl_Git_SVN_Editor.pm
new file mode 100644
index 00000000000..de29cd71fd1
--- /dev/null
+++ b/devel/git-base/patches/patch-perl_Git_SVN_Editor.pm
@@ -0,0 +1,51 @@
+$NetBSD: patch-perl_Git_SVN_Editor.pm,v 1.1 2014/01/14 18:49:55 wiz Exp $
+
+[PATCH] git-svn: workaround for a bug in svn serf backend
+
+Subversion serf backend in versions 1.8.5 and below has a bug that the
+function creating the descriptor of a file change -- add_file() --
+doesn't make a copy of its 3d argument when storing it on the returned
+descriptor. As a result, by the time this field is used (in
+transactions of file copying or renaming) it may well be released.
+
+This patch works around this bug, by storing the value to be passed as
+the 3d argument to add_file() in a local variable with the same scope as
+the file change descriptor, making sure their lifetime is the same.
+
+Cc: Benjamin Pabst <benjamin.pabst85 <at> gmail.com>
+Cc: Eric Wong <normalperson <at> yhbt.net>
+Signed-off-by: Roman Kagan <rkagan <at> mail.ru>
+---
+ perl/Git/SVN/Editor.pm | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+http://permalink.gmane.org/gmane.comp.version-control.git/239690
+
+--- perl/Git/SVN/Editor.pm.orig 2013-12-17 23:46:08.000000000 +0000
++++ perl/Git/SVN/Editor.pm
+@@ -304,8 +304,12 @@ sub C {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
++ # workaround for a bug in svn serf backend (v1.8.5 and below):
++ # store 3d argument to ->add_file() in a local variable, to make it
++ # have the same lifetime as $fbat
++ my $upa = $self->url_path($m->{file_a});
+ my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
+- $self->url_path($m->{file_a}), $self->{r});
++ $upa, $self->{r});
+ print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
+ $self->chg_file($fbat, $m);
+ $self->close_file($fbat,undef,$self->{pool});
+@@ -323,8 +327,10 @@ sub R {
+ my ($self, $m, $deletions) = @_;
+ my ($dir, $file) = split_path($m->{file_b});
+ my $pbat = $self->ensure_path($dir, $deletions);
++ # workaround for a bug in svn serf backend, see comment in C() above
++ my $upa = $self->url_path($m->{file_a});
+ my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
+- $self->url_path($m->{file_a}), $self->{r});
++ $upa, $self->{r});
+ print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
+ $self->apply_autoprops($file, $fbat);
+ $self->chg_file($fbat, $m);