git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn, remote tracking branch question

From
EWEric Wong <normalperson@yhbt.net>
Date
Mar 31, 2007, 00:32 UTC
Message-ID
<20070331003219.GA5145@muzzle>
In-Reply-To
<20070329205824.GA19796@muzzle>
Eric Wong <normalperson@yhbt.net> wrote:
Show 7 quoted lines
> Eric Wong <normalperson@yhbt.net> 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@yhbt.net>
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@yhbt.net>
---
 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
Previous: Eric Wong
Message 5 of 5 in “git-svn, remote tracking branch question”
  1. Seth FalconMar 27, 2007
  2. Eric WongMar 27, 2007
  3. Seth FalconMar 28, 2007
  4. Eric WongMar 29, 2007
  5. Eric WongMar 31, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.