group: When no groups are specified to set, lists the current groups of a repository.

This commit is contained in:
Joey Hess 2014-05-16 14:43:40 -04:00
parent 65651a3e26
commit 00986d19f4
4 changed files with 13 additions and 3 deletions

View file

@ -26,10 +26,14 @@ start :: [String] -> CommandStart
start (name:g:[]) = do
showStart "group" name
u <- Remote.nameToUUID name
next $ perform u g
next $ setGroup u g
start (name:[]) = do
u <- Remote.nameToUUID name
showRaw . unwords . S.toList =<< lookupGroups u
stop
start _ = error "Specify a repository and a group."
perform :: UUID -> Group -> CommandPerform
perform uuid g = do
setGroup :: UUID -> Group -> CommandPerform
setGroup uuid g = do
groupChange uuid (S.insert g)
next $ return True