aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-12-12 16:45:00 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-12 17:26:23 -0800
commitc53d696bcc2894b0df277e617740b15bac794df9 (patch)
treecb48d15e37c4a03db6d9f6ade5ea5cb69c04996f /git-svn.perl
parentfa2376f3c89ae59f33e50e0e5769dec2652e9568 (diff)
downloadgit-c53d696bcc2894b0df277e617740b15bac794df9.tar.gz
git-c53d696bcc2894b0df277e617740b15bac794df9.tar.xz
git-svn: correctly handle packed-refs in refs/remotes/
We now use git-rev-parse universally to read refs, instead of our own file_to_s function (which I plan on removing). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index c746a3c62..15254e479 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2027,9 +2027,17 @@ sub git_commit {
# just in case we clobber the existing ref, we still want that ref
# as our parent:
- if (my $cur = eval { file_to_s("$GIT_DIR/refs/remotes/$GIT_SVN") }) {
+ open my $null, '>', '/dev/null' or croak $!;
+ open my $stderr, '>&', \*STDERR or croak $!;
+ open STDERR, '>&', $null or croak $!;
+ if (my $cur = eval { safe_qx('git-rev-parse',
+ "refs/remotes/$GIT_SVN^0") }) {
+ chomp $cur;
push @tmp_parents, $cur;
}
+ open STDERR, '>&', $stderr or croak $!;
+ close $stderr or croak $!;
+ close $null or croak $!;
if (exists $tree_map{$tree}) {
foreach my $p (@{$tree_map{$tree}}) {