Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl11
1 files changed, 10 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 2c86ea2e38..b3b6964f95 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1185,6 +1185,7 @@ sub cmd_reset {
"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";
}
@@ -2086,6 +2087,14 @@ sub refname {
# .. becomes %2E%2E
$refname =~ s{\.\.}{%2E%2E}g;
+ # trailing dots and .lock are not allowed
+ # .$ becomes %2E and .lock becomes %2Elock
+ $refname =~ s{\.(?=$|lock$)}{%2E};
+
+ # the sequence @{ is used to access the reflog
+ # @{ becomes %40{
+ $refname =~ s{\@\{}{%40\{}g;
+
return $refname;
}
@@ -3605,6 +3614,7 @@ sub mkfile {
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";
@@ -3998,7 +4008,6 @@ use vars qw/@ISA/;
use strict;
use warnings;
use Carp qw/croak/;
-use File::Temp qw/tempfile/;
use IO::File qw//;
use vars qw/$_ignore_regex/;