Code

receive-pack: move more work into write_head_info()
[git.git] / git-svn.perl
index b67fef0bf69da170a5a9748b9da8c31c6e1ca5c7..eeb83d375931df81bd87ca285c8d0741c14f33a2 100755 (executable)
@@ -684,7 +684,7 @@ sub populate_merge_info {
                                fatal "merge commit $d has ancestor $parent, but that change "
                      ."does not have git-svn metadata!";
                        }
-                       unless ($branchurl =~ /^$rooturl(.*)/) {
+                       unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
                                fatal "commit $parent git-svn metadata changed mid-run!";
                        }
                        my $branchpath = $1;
@@ -867,7 +867,7 @@ sub cmd_dcommit {
                                                         ."has uuid $uuid!";
                                        }
 
-                                       unless ($branchurl =~ /^$rooturl(.*)/) {
+                                       unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
                                                # This branch is very strange indeed.
                                                fatal "merge parent $parent for $d is on branch "
                                                         ."$branchurl, which is not under the "
@@ -5389,7 +5389,7 @@ sub apply_diff {
                                       $self->{mergeinfo});
        }
        $self->rmdirs if $_rmdir;
-       if (@$mods == 0) {
+       if (@$mods == 0 && !defined($self->{mergeinfo})) {
                $self->abort_edit;
        } else {
                $self->close_edit;