really fix referring to remotes by uuid
This commit is contained in:
parent
17b29176b8
commit
03e54680ff
1 changed files with 4 additions and 3 deletions
|
@ -119,11 +119,12 @@ nameToUUID n = do
|
||||||
where
|
where
|
||||||
byDescription = do
|
byDescription = do
|
||||||
m <- uuidMap
|
m <- uuidMap
|
||||||
case M.lookup n $ invertMap m of
|
case M.lookup n $ transform swap m of
|
||||||
Just u -> return $ Just u
|
Just u -> return $ Just u
|
||||||
Nothing -> return $ M.lookup n m
|
Nothing -> return $ M.lookup n $ transform double m
|
||||||
invertMap = M.fromList . map swap . M.toList
|
transform a = M.fromList . map a . M.toList
|
||||||
swap (a, b) = (b, a)
|
swap (a, b) = (b, a)
|
||||||
|
double (a, _) = (a, a)
|
||||||
|
|
||||||
{- Pretty-prints a list of UUIDs of remotes, for human display.
|
{- Pretty-prints a list of UUIDs of remotes, for human display.
|
||||||
-
|
-
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue