gitremotes: don't fetch the new remote until we've turned off tags
authorSimon McVittie <smcv@debian.org>
Sun, 9 May 2010 15:44:47 +0000 (16:44 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 9 May 2010 15:44:47 +0000 (16:44 +0100)
gitremotes

index 6c03011..5cafad1 100755 (executable)
@@ -16,9 +16,10 @@ while (<IN>) {
                my ($oldurl)=$info=~/URL: (.*)/m;
                if ($oldurl ne $url) {
                        system("git remote rm $remote 2>/dev/null");
-                       system("git", "remote", "add", "-f", $remote, $url);
+                       system("git", "remote", "add", $remote, $url);
                        system("git", "config", "remote.$remote.tagopt",
                                "--no-tags");
+                       system("git", "fetch", $remote);
                }
        }
 }