git-svn: fail on rebase if we are unable to find a ref to rebase against
authorEric Wong <normalperson@yhbt.net>
Sat, 31 Mar 2007 21:00:18 +0000 (14:00 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 31 Mar 2007 22:22:59 +0000 (15:22 -0700)
If we're on an invalid HEAD, we should detect this and avoid
attempting to continue.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svn.perl

index 278f45d6d0669afc3bb7f5b002d76f314c4e22f0..d307d430f3a9475ff6db3fb73bad44bf37dfa404 100755 (executable)
@@ -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');