summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command/Group.hs10
-rw-r--r--debian/changelog2
-rw-r--r--doc/git-annex.mdwn2
-rw-r--r--doc/todo/wishlist:_git_annex_group_remote_return_the_group.mdwn2
4 files changed, 13 insertions, 3 deletions
diff --git a/Command/Group.hs b/Command/Group.hs
index b0dbc1465..2b5cd2ec4 100644
--- a/Command/Group.hs
+++ b/Command/Group.hs
@@ -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
diff --git a/debian/changelog b/debian/changelog
index 98bb83357..fe14e8e79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ git-annex (5.20140422) UNRELEASED; urgency=medium
* Added ddar special remote.
Thanks, Robie Basak.
* webapp: Fixed drag and drop to reorder the list of remotes.
+ * group: When no groups are specified to set, lists the current groups
+ of a repository.
-- Joey Hess <joeyh@debian.org> Fri, 02 May 2014 15:28:53 -0300
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index bb741810c..e2f662e64 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -456,6 +456,8 @@ subdirectories).
Adds a repository to a group, such as "archival", "enduser", or "transfer".
The groupname must be a single word.
+ Omit the groupname to show the current groups that a repository is in.
+
* `ungroup repository groupname`
Removes a repository from a group.
diff --git a/doc/todo/wishlist:_git_annex_group_remote_return_the_group.mdwn b/doc/todo/wishlist:_git_annex_group_remote_return_the_group.mdwn
index ace9842ee..5c8d8b011 100644
--- a/doc/todo/wishlist:_git_annex_group_remote_return_the_group.mdwn
+++ b/doc/todo/wishlist:_git_annex_group_remote_return_the_group.mdwn
@@ -7,3 +7,5 @@ It would be good if the command
returned the current list of groups the repository belongs to...(can it belong to more than one?)
Currently the command requires an additional parameter to set the group.
+
+> [[done]] --[[Joey]]