Skip to content

Commit

Permalink
git svn: catch lack of upstream info for dcommit earlier
Browse files Browse the repository at this point in the history
Since 711521e 'git svn dcommit' attempts to use the upstream
information to determine the SVN URL, before it verifies that it even
found an upstream.  Move up the corresponding check.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Thomas Rast authored and Eric Wong committed Sep 5, 2008
1 parent 991255c commit 2cb6110
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,15 @@ sub cmd_dcommit {
$head ||= 'HEAD';
my @refs;
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
unless ($gs) {
die "Unable to determine upstream SVN information from ",
"$head history.\nPerhaps the repository is empty.";
}
$url = defined $_commit_url ? $_commit_url : $gs->full_url;
my $last_rev = $_revision if defined $_revision;
if ($url) {
print "Committing to $url ...\n";
}
unless ($gs) {
die "Unable to determine upstream SVN information from ",
"$head history.\nPerhaps the repository is empty.";
}
my ($linear_refs, $parents) = linearize_history($gs, \@refs);
if ($_no_rebase && scalar(@$linear_refs) > 1) {
warn "Attempting to commit more than one change while ",
Expand Down

0 comments on commit 2cb6110

Please sign in to comment.