diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-31 15:17:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-31 15:26:19 -0400 |
commit | a43b7bf71a2369167045ce9ecbddd08276f0e990 (patch) | |
tree | 5fe8545a368d7f30837e28dddab083a35310dc29 /Assistant/MakeRemote.hs | |
parent | 8f4726ff9e194d8b5e27b03e45d49de5325b8d1a (diff) |
webapp: Generate better git remote names.
Wrote a better git remote name sanitizer. Git blows up on lots of weird
stuff, especially if it starts the remote name, but I managed to get
some common punctuation working.
Diffstat (limited to 'Assistant/MakeRemote.hs')
-rw-r--r-- | Assistant/MakeRemote.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs index 8f5d903e6..0cd3369be 100644 --- a/Assistant/MakeRemote.hs +++ b/Assistant/MakeRemote.hs @@ -19,10 +19,10 @@ import qualified Git.Command import qualified Command.InitRemote import Logs.UUID import Logs.Remote +import Git.Remote import qualified Data.Text as T import qualified Data.Map as M -import Data.Char {- Sets up and begins syncing with a new ssh or rsync remote. -} makeSshRemote :: Bool -> SshData -> Assistant Remote @@ -112,6 +112,4 @@ uniqueRemoteName basename n r name | n == 0 = legalbasename | otherwise = legalbasename ++ show n - legalbasename = filter legal basename - legal '_' = True - legal c = isAlphaNum c + legalbasename = makeLegalName basename |