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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Eric Wong 2007-03-31 14:00:18 -07:00 committed by Junio C Hamano
parent a97e4075a1
commit d6bad6610a

View file

@ -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');