Skip to content

Commit

Permalink
git-svn: fail on rebase if we are unable to find a ref to rebase against
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Mar 31, 2007
1 parent a97e407 commit d6bad66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit d6bad66

Please sign in to comment.