info: avoid strange display of here repo when it has NoUUID

This happens when info is run in a git repo before git annex init.
This commit is contained in:
Joey Hess 2014-10-28 16:03:57 -04:00
parent c6f0a65832
commit 2d77bb310f

View file

@ -221,7 +221,8 @@ repository_mode = simpleStat "repository mode" $ lift $
remote_list :: TrustLevel -> Stat
remote_list level = stat n $ nojson $ lift $ do
us <- M.keys <$> (M.union <$> uuidMap <*> remoteMap Remote.name)
us <- filter (/= NoUUID) . M.keys
<$> (M.union <$> uuidMap <*> remoteMap Remote.name)
rs <- fst <$> trustPartition level us
s <- prettyPrintUUIDs n rs
return $ if null s then "0" else show (length rs) ++ "\n" ++ beginning s