Re: git-svn, remote tracking branch question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Wong <normalperson@xxxxxxxx> wrote:
> Eric Wong <normalperson@xxxxxxxx> wrote:
> > I'll look into this more when/if I have time tonight.
> 
> Sorry, I tried to look into it this morning at 1-2am but wasn't
> successful in reproducing it.  I'm glad the workaround I provided
> worked, but I'll take another stab at solving the problem tonight
> or this weekend.

Alright, I'm still unable to figure it out.  Here's a patch
that should at least cause it to error out and tell you
which URL it was trying to lookup.

>From 4bf0314f4665b612cbd735fdfae45f84c1e21c04 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@xxxxxxxx>
Date: Fri, 30 Mar 2007 17:30:30 -0700
Subject: [PATCH] git-svn: fail on rebase if we are unable to find a ref to rebase against

If we're on an invalid HEAD, we should detect this and avoid
attempting to continue.

Signed-off-by: Eric Wong <normalperson@xxxxxxxx>
---
 git-svn.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index e0a48c2..adc976c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -435,6 +435,9 @@ sub cmd_rebase {
 	}
 
 	my $gs = Git::SVN->find_by_url($url);
+	unless ($gs) {
+		die "Unable to determine remote information from URL: $url\n";
+	}
 	if (command(qw/diff-index HEAD --/)) {
 		print STDERR "Cannot rebase with uncommited changes:\n";
 		command_noisy('status');
-- 
Eric Wong
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]