From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH 4/3] git-svn: correctly handle packed-refs in refs/remotes/
Date: Tue, 12 Dec 2006 16:45:00 -0800 [thread overview]
Message-ID: <20061213004500.GA17811@localdomain> (raw)
In-Reply-To: <11659636263755-git-send-email-normalperson@yhbt.net>
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>
---
git-svn.perl | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 1f8a3b0..aac8f73 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2016,9 +2016,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}}) {
--
1.4.4.2.g6f98
next prev parent reply other threads:[~2006-12-13 1:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 22:47 [PATCH 1/3] git-svn: enable logging of information not supported by git Eric Wong
2006-12-12 22:47 ` [PATCH 2/3] git-svn: allow dcommit to take an alternate head Eric Wong
2006-12-12 22:47 ` [PATCH 3/3] git-svn: correctly display fatal() error messages Eric Wong
2006-12-13 0:45 ` Eric Wong [this message]
2006-12-13 1:27 ` [PATCH 4/3] git-svn: correctly handle packed-refs in refs/remotes/ Junio C Hamano
2006-12-13 2:26 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061213004500.GA17811@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).