git-svn: don't die on rebuild when --upgrade is specified
[gitweb.git] / git-svn.perl
index cc3335a53f0c783c867c8924f0d922142ce9fdb8..4a56f1871a6e185c4504d2464f264a8d8adc124b 100755 (executable)
@@ -3139,7 +3139,7 @@ sub copy_remote_ref {
        my $ref = "refs/remotes/$GIT_SVN";
        if (safe_qx('git-ls-remote', $origin, $ref)) {
                sys(qw/git fetch/, $origin, "$ref:$ref");
-       } else {
+       } elsif ($_cp_remote && !$_upgrade) {
                die "Unable to find remote reference: ",
                                "refs/remotes/$GIT_SVN on $origin\n";
        }