enableremote: Support --json and --json-error-messages

Seems unlikely to be too useful, but who knows. Was trivial anyway.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
Joey Hess 2023-05-10 14:09:27 -04:00
parent b3cc8dbacb
commit a242eabc7a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 21 additions and 13 deletions

View file

@ -30,10 +30,11 @@ import Git.Config
import qualified Data.Map as M
cmd :: Command
cmd = command "enableremote" SectionSetup
"enables git-annex to use a remote"
(paramPair paramName $ paramOptional $ paramRepeating paramParamValue)
(withParams seek)
cmd = withAnnexOptions [jsonOptions] $
command "enableremote" SectionSetup
"enables git-annex to use a remote"
(paramPair paramName $ paramOptional $ paramRepeating paramParamValue)
(withParams seek)
seek :: CmdParams -> CommandSeek
seek = withWords (commandAction . start)