summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 212f0ba)
raw | patch | inline | side by side (parent: 212f0ba)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 4 May 2010 23:36:47 +0000 (16:36 -0700) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Sun, 9 May 2010 08:22:31 +0000 (01:22 -0700) |
When "git svn reset" is called with an invalid revision, we
bail out and show the user a proper error message instead
of giving them a cryptic one related to git-svn internals.
ref: http://bugs.debian.org/578908
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reported-by: Jens Seidel <jensseidel@users.sf.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
bail out and show the user a proper error message instead
of giving them a cryptic one related to git-svn internals.
ref: http://bugs.debian.org/578908
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reported-by: Jens Seidel <jensseidel@users.sf.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 2c86ea2e384e4b3ecf9f6c2a856c52a0203ce489..dc668034d0e3db11c41e8667db22205b95733421 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
"history\n";
}
my ($r, $c) = $gs->find_rev_before($target, not $_fetch_parent);
+ die "Cannot find SVN revision $target\n" unless defined($c);
$gs->rev_map_set($r, $c, 'reset', $uuid);
print "r$r = $c ($gs->{ref_id})\n";
}
sub rev_map_set {
my ($self, $rev, $commit, $update_ref, $uuid) = @_;
+ defined $commit or die "missing arg3\n";
length $commit == 40 or die "arg3 must be a full SHA1 hexsum\n";
my $db = $self->map_path($uuid);
my $db_lock = "$db.lock";