add section metadata to all commands
authorJoey Hess <joey@kitenet.net>
Sun, 24 Mar 2013 22:28:21 +0000 (18:28 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 24 Mar 2013 22:28:21 +0000 (18:28 -0400)
Not yet used .. mindless train work.

59 files changed:
Command.hs
Command/Add.hs
Command/AddUnused.hs
Command/AddUrl.hs
Command/Assistant.hs
Command/Commit.hs
Command/ConfigList.hs
Command/Copy.hs
Command/Dead.hs
Command/Describe.hs
Command/Direct.hs
Command/Drop.hs
Command/DropKey.hs
Command/DropUnused.hs
Command/Find.hs
Command/Fix.hs
Command/FromKey.hs
Command/Fsck.hs
Command/Get.hs
Command/Group.hs
Command/Help.hs
Command/Import.hs
Command/InAnnex.hs
Command/Indirect.hs
Command/Init.hs
Command/InitRemote.hs
Command/Lock.hs
Command/Log.hs
Command/Map.hs
Command/Merge.hs
Command/Migrate.hs
Command/Move.hs
Command/PreCommit.hs
Command/ReKey.hs
Command/RecvKey.hs
Command/Reinject.hs
Command/Semitrust.hs
Command/SendKey.hs
Command/Status.hs
Command/Sync.hs
Command/Test.hs
Command/TransferInfo.hs
Command/TransferKey.hs
Command/TransferKeys.hs
Command/Trust.hs
Command/Unannex.hs
Command/Ungroup.hs
Command/Uninit.hs
Command/Unlock.hs
Command/Untrust.hs
Command/Unused.hs
Command/Upgrade.hs
Command/Version.hs
Command/Vicfg.hs
Command/Watch.hs
Command/WebApp.hs
Command/Whereis.hs
Command/XMPPGit.hs
Types/Command.hs

index 8225f7b1bbc16043255311aeac7527ed029412ec..5c1395ed7761d6750dcf4aad9367d7a7fe60d1b1 100644 (file)
@@ -40,7 +40,7 @@ import Config
 import Annex.CheckAttr
 
 {- Generates a normal command -}
-command :: String -> String -> [CommandSeek] -> String -> Command
+command :: String -> String -> [CommandSeek] -> CommandSection -> String -> Command
 command = Command [] Nothing commonChecks False
 
 {- Indicates that a command doesn't need to commit any changes to
index 343ffbe95fa2f97510195845fc056bccb32cb448..cf2a55c50f4f01b1ad1abe3ae89c83e629a3ff51 100644 (file)
@@ -29,7 +29,8 @@ import Config
 import Utility.InodeCache
 
 def :: [Command]
-def = [notBareRepo $ command "add" paramPaths seek "add files to annex"]
+def = [notBareRepo $ command "add" paramPaths seek SectionCommon
+       "add files to annex"]
 
 {- Add acts on both files not checked into git yet, and unlocked files.
  -
index 23dbdfcca160255484294dac24403af1d6d4d091..c352d87d0299ac0e1a4c4af4eada30b52945df41 100644 (file)
@@ -15,7 +15,7 @@ import Types.Key
 
 def :: [Command]
 def = [notDirect $ command "addunused" (paramRepeating paramNumRange)
-       seek "add back unused files"]
+       seek SectionMaintenance "add back unused files"]
 
 seek :: [CommandSeek]
 seek = [withUnusedMaps start]
index ceb35224d20eac23c20f82e2c2421c9e5abf71eb..7c235922d00bf709ea7e6a1fc90bb31656bb98ab 100644 (file)
@@ -26,7 +26,8 @@ import Annex.Content.Direct
 
 def :: [Command]
 def = [notBareRepo $ withOptions [fileOption, pathdepthOption, relaxedOption] $
-       command "addurl" (paramRepeating paramUrl) seek "add urls to annex"]
+       command "addurl" (paramRepeating paramUrl) seek
+               SectionCommon "add urls to annex"]
 
 fileOption :: Option
 fileOption = Option.field [] "file" paramFile "specify what file the url is added to"
index 69a127b505e0d3d0316b078ed7e3c35ba6d7c706..0997088adf280086ed94a2999b30d8685e4cf93e 100644 (file)
@@ -20,7 +20,8 @@ import System.Posix.Directory
 def :: [Command]
 def = [noRepo checkAutoStart $ dontCheck repoExists $
        withOptions [Command.Watch.foregroundOption, Command.Watch.stopOption, autoStartOption] $ 
-       command "assistant" paramNothing seek "automatically handle changes"]
+       command "assistant" paramNothing seek SectionCommon
+               "automatically handle changes"]
 
 autoStartOption :: Option
 autoStartOption = Option.flag [] "autostart" "start in known repositories"
index 16590613947919c1357ecc4f1c5474ccfc072ee6..6f3f9df2857000c61b59e511b8d59fb6f6de89a0 100644 (file)
@@ -14,7 +14,7 @@ import qualified Git
 
 def :: [Command]
 def = [command "commit" paramNothing seek
-       "commits any staged changes to the git-annex branch"]
+       SectionPlumbing "commits any staged changes to the git-annex branch"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 505ad99e1b5e9a5dee3e7f534ce3018e21155062..703d6882d8acf8ed429ce5959130357a0ad1c980 100644 (file)
@@ -13,7 +13,7 @@ import Annex.UUID
 
 def :: [Command]
 def = [noCommit $ command "configlist" paramNothing seek
-       "outputs relevant git configuration"]
+       SectionPlumbing "outputs relevant git configuration"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 4b04a2423e411658911303b561abd933b88a957b..75b91c85cc28a12f864b936015df6f94abb4bd4e 100644 (file)
@@ -15,7 +15,7 @@ import Annex.Wanted
 
 def :: [Command]
 def = [withOptions Command.Move.options $ command "copy" paramPaths seek
-       "copy content of files to/from another repository"]
+       SectionCommon "copy content of files to/from another repository"]
 
 seek :: [CommandSeek]
 seek = [withField Command.Move.toOption Remote.byNameWithUUID $ \to ->
index 34595769ffba55e6195460c62ffd9d016b4658e2..f4b654ed9bd7e3ecd4cc2be8b955eea05606810e 100644 (file)
@@ -17,7 +17,7 @@ import qualified Data.Set as S
 
 def :: [Command]
 def = [command "dead" (paramRepeating paramRemote) seek
-       "hide a lost repository"]
+       SectionSetup "hide a lost repository"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 61297e77c7c65cf747ef575a2815e11848c4e490..18851b1726ef88e7b0a1ea5962e1500bb06010fd 100644 (file)
@@ -14,7 +14,7 @@ import Logs.UUID
 
 def :: [Command]
 def = [command "describe" (paramPair paramRemote paramDesc) seek
-       "change description of a repository"]
+       SectionSetup "change description of a repository"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 1617bd9c20dca7486bf992353d2f46e0084fed5b..7ded712aeafcf5e9b3f908d14407b2a05bb67729 100644 (file)
@@ -18,7 +18,8 @@ import Annex.Version
 
 def :: [Command]
 def = [notBareRepo $ 
-       command "direct" paramNothing seek "switch repository to direct mode"]
+       command "direct" paramNothing seek
+               SectionSetup "switch repository to direct mode"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 1d09ca3fdadce0249845e62befb7da6e78a7c8c1..4e3a062af4b984b6de7845e3e0563679363c93e5 100644 (file)
@@ -21,7 +21,7 @@ import Annex.Wanted
 
 def :: [Command]
 def = [withOptions [fromOption] $ command "drop" paramPaths seek
-       "indicate content of files not currently wanted"]
+       SectionCommon "indicate content of files not currently wanted"]
 
 fromOption :: Option
 fromOption = Option.field ['f'] "from" paramRemote "drop content from a remote"
index c0d4f85cfeef8d142ed70b1f77c92c9e703b1d03..62491958408e843b45f7b2a78f44d496d7fd2926 100644 (file)
@@ -16,7 +16,7 @@ import Types.Key
 
 def :: [Command]
 def = [noCommit $ command "dropkey" (paramRepeating paramKey) seek
-       "drops annexed content for specified keys"] 
+       SectionPlumbing "drops annexed content for specified keys"] 
 
 seek :: [CommandSeek]
 seek = [withKeys start]
index ccf43c0403aa6876bff42ba2cce33852ee4f2001..a23e0cb395ef0014a32a07553f57c93b8c68f65f 100644 (file)
@@ -19,7 +19,7 @@ import qualified Option
 def :: [Command]
 def = [withOptions [Command.Drop.fromOption] $
        command "dropunused" (paramRepeating paramNumRange)
-               seek "drop unused file content"]
+               seek SectionMaintenance "drop unused file content"]
 
 seek :: [CommandSeek]
 seek = [withUnusedMaps start]
index 96f47ec877c948c23f7a4d8922497da9c2fe9043..a326b263404b0704c9f16b073ca69fa2cc0085d5 100644 (file)
@@ -21,7 +21,7 @@ import qualified Option
 
 def :: [Command]
 def = [noCommit $ withOptions [formatOption, print0Option] $
-       command "find" paramPaths seek "lists available files"]
+       command "find" paramPaths seek SectionQuery "lists available files"]
 
 formatOption :: Option
 formatOption = Option.field [] "format" paramFormat "control format of output"
index e15951c213c03f28c00fc5ef55752c7c0ecd8ade..dbccfacdfac28d0fdd9b30a01321e9a601628264 100644 (file)
@@ -14,7 +14,7 @@ import Annex.Content
 
 def :: [Command]
 def = [notDirect $ noCommit $ command "fix" paramPaths seek
-       "fix up symlinks to point to annexed content"]
+       SectionMaintenance "fix up symlinks to point to annexed content"]
 
 seek :: [CommandSeek]
 seek = [withFilesInGit $ whenAnnexed start]
index d023be686c6937b90bb310cdbc67ffd5492b1f1b..ac5edd1d0c9b3d76ccb225ee8b0ed15267523ab1 100644 (file)
@@ -16,7 +16,7 @@ import Types.Key
 def :: [Command]
 def = [notDirect $ notBareRepo $
        command "fromkey" (paramPair paramKey paramPath) seek
-               "adds a file using a specific key"]
+               SectionPlumbing "adds a file using a specific key"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index aeed58cd130b771660ab1e47ea60d10612cc01fd..501483b1419de9b037162f13bff48f9d55eb5a68 100644 (file)
@@ -36,7 +36,7 @@ import System.Locale
 
 def :: [Command]
 def = [withOptions options $ command "fsck" paramPaths seek
-       "check for problems"]
+       SectionMaintenance "check for problems"]
 
 fromOption :: Option
 fromOption = Option.field ['f'] "from" paramRemote "check remote"
index 95f71a84b0e0883407f68c1b92249daacf313843..432be31e3edb1a28ee7eda9ee35b80db990fd037 100644 (file)
@@ -17,7 +17,7 @@ import Annex.Wanted
 
 def :: [Command]
 def = [withOptions [Command.Move.fromOption] $ command "get" paramPaths seek
-       "make content of annexed files available"]
+       SectionCommon "make content of annexed files available"]
 
 seek :: [CommandSeek]
 seek = [withField Command.Move.fromOption Remote.byNameWithUUID $ \from ->
index 5513ca3f72b76a679da1a2af4221c54f74eec447..aee02b6c42d8eb2e548eb79dab4df6151d9a408e 100644 (file)
@@ -16,7 +16,8 @@ import Types.Group
 import qualified Data.Set as S
 
 def :: [Command]
-def = [command "group" (paramPair paramRemote paramDesc) seek "add a repository to a group"]
+def = [command "group" (paramPair paramRemote paramDesc) seek
+       SectionCommon "add a repository to a group"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 95033eb7f4fa3cc21d5ce61dce66e819ca5e2930..9f7bb34aecde896375579fa3c5ede45e1927ce7d 100644 (file)
@@ -21,7 +21,7 @@ import qualified Command.Fsck
 
 def :: [Command]
 def = [noCommit $ noRepo showHelp $ dontCheck repoExists $
-       command "help" paramNothing seek "display help"]
+       command "help" paramNothing seek SectionUtility "display help"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index e8e839e4fa592bf031feb5a7bddae77b07c0c8a9..d86b44b803394c38a214c9a2f5c2b6d75577d47f 100644 (file)
@@ -14,7 +14,7 @@ import qualified Command.Add
 
 def :: [Command]
 def = [notDirect $ notBareRepo $ command "import" paramPaths seek
-       "move and add files from outside git working copy"]
+       SectionCommon "move and add files from outside git working copy"]
 
 seek :: [CommandSeek]
 seek = [withPathContents start]
index cd4bff2c69f52829df319b4ea298520d68d31e26..4410d722d09c17382a195d6bb2de9eca125c8e9b 100644 (file)
@@ -13,7 +13,7 @@ import Annex.Content
 
 def :: [Command]
 def = [noCommit $ command "inannex" (paramRepeating paramKey) seek
-       "checks if keys are present in the annex"]
+       SectionPlumbing "checks if keys are present in the annex"]
 
 seek :: [CommandSeek]
 seek = [withKeys start]
index 6290e6756e90499db1e08c33d4ef75dcbb4eea7c..e46a3348d0aa13a062dc941c2117ce06cde67d9d 100644 (file)
@@ -22,7 +22,7 @@ import Init
 
 def :: [Command]
 def = [notBareRepo $ command "indirect" paramNothing seek
-       "switch repository to indirect mode"]
+       SectionSetup "switch repository to indirect mode"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 342ef84e15ef10aa6bea8a594222234fb02f573f..3db9a6be3e512090ab9a1842c097bf3194131da3 100644 (file)
@@ -13,7 +13,7 @@ import Init
        
 def :: [Command]
 def = [dontCheck repoExists $
-       command "init" paramDesc seek "initialize git-annex"]
+       command "init" paramDesc seek SectionSetup "initialize git-annex"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 684f868efe47621db75917ced3885a6b3e719cfa..c82dc9ddf5498e6e8afcaed92aba8273d3ecf376 100644 (file)
@@ -20,7 +20,7 @@ import Logs.UUID
 def :: [Command]
 def = [command "initremote"
        (paramPair paramName $ paramOptional $ paramRepeating paramKeyValue)
-       seek "sets up a special (non-git) remote"]
+       seek SectionSetup "sets up a special (non-git) remote"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index c34e6a16b8bdd54d5155ee8ec72e618d8d259d13..6dc58df749855964b7063b5964a61daa0b7b7a69 100644 (file)
@@ -12,7 +12,8 @@ import Command
 import qualified Annex.Queue
        
 def :: [Command]
-def = [notDirect $ command "lock" paramPaths seek "undo unlock command"]
+def = [notDirect $ command "lock" paramPaths seek SectionCommon
+       "undo unlock command"]
 
 seek :: [CommandSeek]
 seek = [withFilesUnlocked start, withFilesUnlockedToBeCommitted start]
index 6608a99065ceca357acd6180b9acc9983ff6c36a..2d4819f7ff43c62d3dcac2440d28549caf9d1501 100644 (file)
@@ -37,7 +37,7 @@ type Outputter = Bool -> POSIXTime -> [UUID] -> Annex ()
 
 def :: [Command]
 def = [withOptions options $
-       command "log" paramPaths seek "shows location log"]
+       command "log" paramPaths seek SectionQuery "shows location log"]
 
 options :: [Option]
 options = passthruOptions ++ [gourceOption]
index f2ac5204729775f3574fff755b71dda19bd6ebe9..c88520b079961b2689d6c05eab4a7cb730fb9fbf 100644 (file)
@@ -28,7 +28,8 @@ data Link = Link Git.Repo Git.Repo
 
 def :: [Command]
 def = [dontCheck repoExists $
-       command "map" paramNothing seek "generate map of repositories"]
+       command "map" paramNothing seek SectionQuery
+               "generate map of repositories"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 0f46614971dabaed584668828e7a9b430b81687d..382a251dfffe0ee903d1c6cfe87cd142c3728e88 100644 (file)
@@ -12,8 +12,8 @@ import Command
 import qualified Annex.Branch
 
 def :: [Command]
-def = [command "merge" paramNothing seek
-               "auto-merge remote changes into git-annex branch"]
+def = [command "merge" paramNothing seek SectionMaintenance
+       "auto-merge remote changes into git-annex branch"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 5374bc928ad8b1fa6e0808cbb80bcc04304dcfc3..795f9ed7b619b8fa78ebed2c86c5db710398dcc0 100644 (file)
@@ -19,7 +19,8 @@ import qualified Command.Fsck
 
 def :: [Command]
 def = [notDirect $ 
-       command "migrate" paramPaths seek "switch data to different backend"]
+       command "migrate" paramPaths seek
+               SectionUtility "switch data to different backend"]
 
 seek :: [CommandSeek]
 seek = [withFilesInGit $ whenAnnexed start]
index cc8fb506fd52528f9dd8e2562a2687c02bb03725..31daf5529c67356c8130dde8fbe0358b7371088f 100644 (file)
@@ -20,7 +20,7 @@ import Logs.Transfer
 
 def :: [Command]
 def = [withOptions options $ command "move" paramPaths seek
-       "move content of files to/from another repository"]
+       SectionCommon "move content of files to/from another repository"]
 
 fromOption :: Option
 fromOption = Option.field ['f'] "from" paramRemote "source remote"
index 23b6ecc0aaffa725e6e18c57408d086ebfa06a6a..565344d2574dd3ad2ff17e17b6ee4c4a12992e77 100644 (file)
@@ -17,7 +17,8 @@ import Annex.Content.Direct
 import Git.Sha
 
 def :: [Command]
-def = [command "pre-commit" paramPaths seek "run by git pre-commit hook"]
+def = [command "pre-commit" paramPaths seek SectionPlumbing
+       "run by git pre-commit hook"]
 
 seek :: [CommandSeek]
 seek =
index 54a345dcbb9d3188b2d2fb45c83ba58ce31d83b7..5978a02966881a8668416e7df0ad68aa7ae1e263 100644 (file)
@@ -20,7 +20,7 @@ import Utility.CopyFile
 def :: [Command]
 def = [notDirect $ command "rekey"
        (paramOptional $ paramRepeating $ paramPair paramPath paramKey)
-       seek "change keys used for files"]
+       seek SectionPlumbing "change keys used for files"]
 
 seek :: [CommandSeek]
 seek = [withPairs start]
index 11a5fd5caafb5ab13df1196fc8a27d89fa927207..c5ff4a9c8a0dd3758237bf88744b937ed218b904 100644 (file)
@@ -21,7 +21,7 @@ import qualified Backend
 
 def :: [Command]
 def = [noCommit $ command "recvkey" paramKey seek
-       "runs rsync in server mode to receive content"]
+       SectionPlumbing "runs rsync in server mode to receive content"]
 
 seek :: [CommandSeek]
 seek = [withKeys start]
index 12657f7f4523d3f667eefe89d10d8aaa7a9305d4..642f38947fd81eca84ccc3eca94415f8418a8fbe 100644 (file)
@@ -15,7 +15,7 @@ import qualified Command.Fsck
 
 def :: [Command]
 def = [notDirect $ command "reinject" (paramPair "SRC" "DEST") seek
-       "sets content of annexed file"]
+       SectionUtility "sets content of annexed file"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index f8c3062131e113c2902504e5ce0031480d7b8d25..e205636726f4d85e8f75f639765f7cd144e385a0 100644 (file)
@@ -14,7 +14,7 @@ import Logs.Trust
 
 def :: [Command]
 def = [command "semitrust" (paramRepeating paramRemote) seek
-       "return repository to default trust level"]
+       SectionSetup "return repository to default trust level"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index dfdec7f92843fded7e61bc8a96cf44eb8b57bce1..3e46d9dd0e462d5f23152442b997555a8305e2ee 100644 (file)
@@ -16,7 +16,7 @@ import qualified Fields
 
 def :: [Command]
 def = [noCommit $ command "sendkey" paramKey seek
-       "runs rsync in server mode to send content"]
+       SectionPlumbing "runs rsync in server mode to send content"]
 
 seek :: [CommandSeek]
 seek = [withKeys start]
index ff71e0120961f4282a1ab14696fad4c7ce8f9561..37d6500f9a0fc58f94a8d061d9b059a8a4b94116 100644 (file)
@@ -58,7 +58,7 @@ type StatState = StateT StatInfo Annex
 
 def :: [Command]
 def = [command "status" (paramOptional paramPaths) seek
-       "shows status information about the annex"]
+       SectionQuery "shows status information about the annex"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 39eda90f7b175263ddea2211b62649fb8c0b2867..eb312c25b36ac3f7cbad2ec53615f39e0dfac148 100644 (file)
@@ -34,7 +34,7 @@ import Data.Hash.MD5
 
 def :: [Command]
 def = [command "sync" (paramOptional (paramRepeating paramRemote))
-       [seek] "synchronize local repository with remotes"]
+       [seek] SectionCommon "synchronize local repository with remotes"]
 
 -- syncing involves several operations, any of which can independently fail
 seek :: CommandSeek
index 7ff9f29631dbedd1248b4a41f7015dd52928dfc0..bf15dcf50fa484a582c42c7d59332ba1d51dd6d4 100644 (file)
@@ -11,7 +11,8 @@ import Command
 
 def :: [Command]
 def = [ dontCheck repoExists $
-       command "test" paramNothing seek "run built-in test suite"]
+       command "test" paramNothing seek SectionPlumbing
+               "run built-in test suite"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 800b721691ea10b00899cfdaaf24be2f80408b96..aacc69bb1397a1e95955ca910903245904e84bde 100644 (file)
@@ -15,7 +15,7 @@ import Types.Key
 import qualified Fields
 
 def :: [Command]
-def = [noCommit $ command "transferinfo" paramKey seek
+def = [noCommit $ command "transferinfo" paramKey seek SectionPlumbing
        "updates sender on number of bytes of content received"]
 
 seek :: [CommandSeek]
index e2c926d407fd5c4a5f6cd1d6aa46c001347dccfe..eb657d7386796ab941b4fdca2a6d13338e0c2302 100644 (file)
@@ -20,7 +20,7 @@ import qualified Option
 
 def :: [Command]
 def = [withOptions options $
-       noCommit $ command "transferkey" paramKey seek
+       noCommit $ command "transferkey" paramKey seek SectionPlumbing
                "transfers a key from or to a remote"]
 
 options :: [Option]
index 2114e22780f32c90fde8718b1e1563e014220839..5fc993dc10aaa9619b483ded01cada22294835fa 100644 (file)
@@ -23,7 +23,8 @@ data TransferRequest = TransferRequest Direction Remote Key AssociatedFile
 
 def :: [Command]
 def = [withOptions options $
-       command "transferkeys" paramNothing seek "plumbing; transfers keys"]
+       command "transferkeys" paramNothing seek
+       SectionPlumbing "transfers keys"]
 
 options :: [Option]
 options = [readFdOption, writeFdOption]
index d976b86a8ffb459421b4918ee3d9bd01d2b02bb0..26993ef7711af5245e97501a26216644571c2b49 100644 (file)
@@ -13,7 +13,8 @@ import qualified Remote
 import Logs.Trust
 
 def :: [Command]
-def = [command "trust" (paramRepeating paramRemote) seek "trust a repository"]
+def = [command "trust" (paramRepeating paramRemote) seek
+       SectionSetup "trust a repository"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index d1f27e86a4d8acd131b18fcd72c08c68e2727072..86cc7d00bbe5e30f398e97a91035fdb20f329b4f 100644 (file)
@@ -17,7 +17,8 @@ import qualified Git.LsFiles as LsFiles
 
 def :: [Command]
 def = [notDirect $
-       command "unannex" paramPaths seek "undo accidential add command"]
+       command "unannex" paramPaths seek SectionUtility
+               "undo accidential add command"]
 
 seek :: [CommandSeek]
 seek = [withFilesInGit $ whenAnnexed start]
index ea5b8edb66e28e8a6eb4043221d42516e3d96beb..a6557f21d34a440341d7491b600209e538ae8c1b 100644 (file)
@@ -16,7 +16,8 @@ import Types.Group
 import qualified Data.Set as S
 
 def :: [Command]
-def = [command "ungroup" (paramPair paramRemote paramDesc) seek "remove a repository from a group"]
+def = [command "ungroup" (paramPair paramRemote paramDesc) seek
+       SectionSetup "remove a repository from a group"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 2ba32a2a6f9f9ae7e2182b057cb4b1b1453d7e31..c57fff01754d7e25ece477ac943f7189df0bb550 100644 (file)
@@ -19,7 +19,7 @@ import Annex.Content
 
 def :: [Command]
 def = [notDirect $ addCheck check $ command "uninit" paramPaths seek 
-       "de-initialize git-annex and clean out repository"]
+       SectionUtility "de-initialize git-annex and clean out repository"]
 
 check :: Annex ()
 check = do
index 422afcc555c3428aadde3ecafa907deccfdaecb1..371b423ee46c250390b3701889ad2101ddbd0cb3 100644 (file)
@@ -18,7 +18,7 @@ def =
        , c "edit" "same as unlock"
        ]
   where
-       c n = notDirect . command n paramPaths seek
+       c n = notDirect . command n paramPaths seek SectionCommon
 
 seek :: [CommandSeek]
 seek = [withFilesInGit $ whenAnnexed start]
index e16040e6bb6c49a5a5319ae0746078fd510fe2f5..f18637838efb1b06d2b816f30de86d93bf918738 100644 (file)
@@ -14,7 +14,7 @@ import Logs.Trust
 
 def :: [Command]
 def = [command "untrust" (paramRepeating paramRemote) seek
-       "do not trust a repository"]
+       SectionSetup "do not trust a repository"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index 25cd18c63cad0689a0be31dd1efb9843ee3b461d..6c4a61cd46740b39df8113741027d26f267d2d97 100644 (file)
@@ -37,7 +37,7 @@ import Types.Key
 
 def :: [Command]
 def = [withOptions [fromOption] $ command "unused" paramNothing seek
-       "look for unused file content"]
+       SectionMaintenance "look for unused file content"]
 
 fromOption :: Option
 fromOption = Option.field ['f'] "from" paramRemote "remote to check for unused content"
index d1c1eb3b0773bd88479df4364a8f7fa08b3cfe7b..88ca8622d3861cd949b838f0f3dd869fa33b5cfa 100644 (file)
@@ -14,7 +14,8 @@ import Annex.Version
 
 def :: [Command]
 def = [dontCheck repoExists $ -- because an old version may not seem to exist
-       command "upgrade" paramNothing seek "upgrade repository layout"]
+       command "upgrade" paramNothing seek
+               SectionMaintenance "upgrade repository layout"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index e066bba5da69c976b09a09ddfe5384fcce2abb51..9d2399b86ceec389f7ece79c650085798b7f194c 100644 (file)
@@ -15,7 +15,7 @@ import BuildFlags
 
 def :: [Command]
 def = [noCommit $ noRepo showPackageVersion $ dontCheck repoExists $
-       command "version" paramNothing seek "show version info"]
+       command "version" paramNothing seek SectionQuery "show version info"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 8aefd86bbd5909067bd1a3953fe2d347dc34cde8..ad0fa020117c78509cf0506e8e00930f3e66001a 100644 (file)
@@ -25,7 +25,7 @@ import Remote
 
 def :: [Command]
 def = [command "vicfg" paramNothing seek
-       "edit git-annex's configuration"]
+       SectionSetup "edit git-annex's configuration"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 25b5c6bba6d017091fd9b553e237002cd6cecb82..f965c30cdbc4a1c1b602d17e3f5e336f53888d4e 100644 (file)
@@ -14,7 +14,7 @@ import Option
 
 def :: [Command]
 def = [notBareRepo $ withOptions [foregroundOption, stopOption] $ 
-       command "watch" paramNothing seek "watch for changes"]
+       command "watch" paramNothing seek SectionCommon "watch for changes"]
 
 seek :: [CommandSeek]
 seek = [withFlag stopOption $ \stopdaemon -> 
index 5e461ed218e9b9bc6b333c12d7fae655af2ccaca..0d232fcdf9c7d04c50cc56e20abb7ca20909cf80 100644 (file)
@@ -31,7 +31,7 @@ import System.Process (env, std_out, std_err)
 
 def :: [Command]
 def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $ notBareRepo $
-       command "webapp" paramNothing seek "launch webapp"]
+       command "webapp" paramNothing seek SectionCommon "launch webapp"]
 
 seek :: [CommandSeek]
 seek = [withNothing start]
index 251c4ec7aa1dcdfb1941e8f9febdf0e1c245498f..7086bf645e6534296e7c632b0533dc04a90ac66b 100644 (file)
@@ -16,7 +16,7 @@ import Logs.Trust
 
 def :: [Command]
 def = [noCommit $ command "whereis" paramPaths seek
-       "lists repositories that have file content"]
+       SectionQuery "lists repositories that have file content"]
 
 seek :: [CommandSeek]
 seek = [withValue (remoteMap id) $ \m ->
index c54d6a84a25bebe8ccf6fcde5a64e3fdc69157f4..c1ff0b1087b5b05e0bb9049f70995e7a362926a7 100644 (file)
@@ -13,7 +13,8 @@ import Assistant.XMPP.Git
 
 def :: [Command]
 def = [noCommit $ noRepo xmppGitRelay $ dontCheck repoExists $
-       command "xmppgit" paramNothing seek "git to XMPP relay (internal use)"]
+       command "xmppgit" paramNothing seek
+               SectionPlumbing "git to XMPP relay"]
 
 seek :: [CommandSeek]
 seek = [withWords start]
index b652bdad5986fafb53d6efe1893195a01bf9c529..1d64c16d16111784185a62110e045846e8041a4f 100644 (file)
@@ -42,6 +42,7 @@ data Command = Command
        , cmdname :: String
        , cmdparamdesc :: String     -- description of params for usage
        , cmdseek :: [CommandSeek]   -- seek stage
+       , cmdsection :: CommandSection
        , cmddesc :: String          -- description of command for usage
        }
 
@@ -55,3 +56,13 @@ instance Eq Command where
 {- Order commands by name -}
 instance Ord Command where
        compare = comparing cmdname
+
+{- The same sections are listed in doc/git-annex.mdwn -}
+data CommandSection 
+       = SectionCommon
+       | SectionSetup
+       | SectionMaintenance
+       | SectionQuery
+       | SectionUtility
+       | SectionPlumbing
+       deriving (Eq, Ord, Enum, Bounded)