Skip to content

Commit d6bad66

Browse files
Eric WongJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a97e407 commit d6bad66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-svn.perl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ sub cmd_rebase {
435435
}
436436

437437
my $gs = Git::SVN->find_by_url($url);
438+
unless ($gs) {
439+
die "Unable to determine remote information from URL: $url\n";
440+
}
438441
if (command(qw/diff-index HEAD --/)) {
439442
print STDERR "Cannot rebase with uncommited changes:\n";
440443
command_noisy('status');

0 commit comments

Comments
 (0)