From: Simon McVittie <smcv@debian.org>
Date: Sun, 9 May 2010 15:44:47 +0000 (+0100)
Subject: gitremotes: don't fetch the new remote until we've turned off tags
X-Git-Tag: 3.20100515~33^2~4^2
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/2d60e55303fbabe70b42ee31703a8d4aca2d8460?ds=inline

gitremotes: don't fetch the new remote until we've turned off tags
---

diff --git a/gitremotes b/gitremotes
index 6c03011a8..5cafad1b8 100755
--- a/gitremotes
+++ b/gitremotes
@@ -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);
 		}
 	}
 }