Remove --json option from commands not supporting it.
This commit is contained in:
parent
dce9faf6e4
commit
1d90e72e91
6 changed files with 19 additions and 6 deletions
|
@ -12,9 +12,10 @@ import Command
|
||||||
import qualified Utility.Format
|
import qualified Utility.Format
|
||||||
import Command.Find (formatOption, withFormat, showFormatted, keyVars)
|
import Command.Find (formatOption, withFormat, showFormatted, keyVars)
|
||||||
import Types.Key
|
import Types.Key
|
||||||
|
import GitAnnex.Options
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [noCommit $ noMessages $ withOptions [formatOption] $
|
def = [noCommit $ noMessages $ withOptions [formatOption, jsonOption] $
|
||||||
command "examinekey" (paramRepeating paramKey) seek
|
command "examinekey" (paramRepeating paramKey) seek
|
||||||
SectionPlumbing "prints information from a key"]
|
SectionPlumbing "prints information from a key"]
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,10 @@ import qualified Utility.Format
|
||||||
import Utility.DataUnits
|
import Utility.DataUnits
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import qualified Option
|
import qualified Option
|
||||||
|
import GitAnnex.Options
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [noCommit $ noMessages $ withOptions [formatOption, print0Option] $
|
def = [noCommit $ noMessages $ withOptions [formatOption, print0Option, jsonOption] $
|
||||||
command "find" paramPaths seek SectionQuery "lists available files"]
|
command "find" paramPaths seek SectionQuery "lists available files"]
|
||||||
|
|
||||||
formatOption :: Option
|
formatOption :: Option
|
||||||
|
|
|
@ -21,6 +21,7 @@ import qualified Remote
|
||||||
import qualified Command.Unused
|
import qualified Command.Unused
|
||||||
import qualified Git
|
import qualified Git
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
|
import GitAnnex.Options
|
||||||
import Command
|
import Command
|
||||||
import Utility.DataUnits
|
import Utility.DataUnits
|
||||||
import Utility.DiskFree
|
import Utility.DiskFree
|
||||||
|
@ -70,8 +71,9 @@ data StatInfo = StatInfo
|
||||||
type StatState = StateT StatInfo Annex
|
type StatState = StateT StatInfo Annex
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [noCommit $ command "info" paramPaths seek
|
def = [noCommit $ withOptions [jsonOption] $
|
||||||
SectionQuery "shows general information about the annex"]
|
command "info" paramPaths seek SectionQuery
|
||||||
|
"shows general information about the annex"]
|
||||||
|
|
||||||
seek :: [CommandSeek]
|
seek :: [CommandSeek]
|
||||||
seek = [withWords start]
|
seek = [withWords start]
|
||||||
|
|
|
@ -14,6 +14,7 @@ import qualified Git.Config
|
||||||
import Git.Types
|
import Git.Types
|
||||||
import Command
|
import Command
|
||||||
import Types.TrustLevel
|
import Types.TrustLevel
|
||||||
|
import Types.Messages
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
import qualified Remote
|
import qualified Remote
|
||||||
import qualified Limit
|
import qualified Limit
|
||||||
|
@ -85,3 +86,7 @@ toOption = Option.field ['t'] "to" paramRemote "destination remote"
|
||||||
|
|
||||||
fromToOptions :: [Option]
|
fromToOptions :: [Option]
|
||||||
fromToOptions = [fromOption, toOption]
|
fromToOptions = [fromOption, toOption]
|
||||||
|
|
||||||
|
jsonOption :: Option
|
||||||
|
jsonOption = Option ['j'] ["json"] (NoArg (Annex.setOutput JSONOutput))
|
||||||
|
"enable JSON output"
|
||||||
|
|
|
@ -35,8 +35,6 @@ common =
|
||||||
"avoid verbose output"
|
"avoid verbose output"
|
||||||
, Option ['v'] ["verbose"] (NoArg (Annex.setOutput NormalOutput))
|
, Option ['v'] ["verbose"] (NoArg (Annex.setOutput NormalOutput))
|
||||||
"allow verbose output (default)"
|
"allow verbose output (default)"
|
||||||
, Option ['j'] ["json"] (NoArg (Annex.setOutput JSONOutput))
|
|
||||||
"enable JSON output"
|
|
||||||
, Option ['d'] ["debug"] (NoArg setdebug)
|
, Option ['d'] ["debug"] (NoArg setdebug)
|
||||||
"show debug messages"
|
"show debug messages"
|
||||||
, Option [] ["no-debug"] (NoArg unsetdebug)
|
, Option [] ["no-debug"] (NoArg unsetdebug)
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
git-annex (5.20140118) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Remove --json option from commands not supporting it.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Sat, 18 Jan 2014 11:54:17 -0400
|
||||||
|
|
||||||
git-annex (5.20140117) unstable; urgency=medium
|
git-annex (5.20140117) unstable; urgency=medium
|
||||||
|
|
||||||
* Really fix FTBFS on mipsel and sparc due to test suite not being available
|
* Really fix FTBFS on mipsel and sparc due to test suite not being available
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue