Simplified repository description line format. The remote name, if any, is always in square brackets after the description.

This commit is contained in:
Joey Hess 2014-04-26 21:28:49 -03:00
parent 72ec0ab736
commit f80f0e12fe
4 changed files with 8 additions and 5 deletions

View file

@ -87,9 +87,8 @@ uuidDescriptions = M.unionWith addName <$> uuidMap <*> remoteMap name
addName :: String -> RemoteName -> String
addName desc n
| desc == n = desc
| null desc = n
| otherwise = n ++ " (" ++ desc ++ ")"
| desc == n || null desc = "[" ++ n ++ "]"
| otherwise = desc ++ " [" ++ n ++ "]"
{- When a name is specified, looks up the remote matching that name.
- (Or it can be a UUID.) -}