From 7efdab3852ef9af40d6167da6debfdd331729df5 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Mon, 14 Jan 2013 18:42:15 -0400
Subject: [PATCH] avoid doing anything if new and old sanitized git remote name
 are the same

---
 Assistant/WebApp/Configurators/Edit.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs
index 88cc86dee6..6802b55210 100644
--- a/Assistant/WebApp/Configurators/Edit.hs
+++ b/Assistant/WebApp/Configurators/Edit.hs
@@ -24,6 +24,7 @@ import Types.StandardGroups
 import qualified Git
 import qualified Git.Command
 import qualified Git.Config
+import Git.Remote
 
 import qualified Data.Text as T
 import qualified Data.Map as M
@@ -64,7 +65,7 @@ setRepoConfig uuid mremote oldc newc = do
 			RepoGroupCustom s -> groupSet uuid $ S.fromList $ words s
 	when (repoSyncable oldc /= repoSyncable newc) $
 		changeSyncable mremote (repoSyncable newc)
-	when (isJust mremote && repoName oldc /= repoName newc) $ do
+	when (isJust mremote && makeLegalName (T.unpack $ repoName oldc) /= makeLegalName (T.unpack $ repoName newc)) $ do
 		runAnnex undefined $ do
 			name <- fromRepo $ uniqueRemoteName (T.unpack $ repoName newc) 0
 			{- git remote rename expects there to be a