status --json --fast for esc

* status: Fix --json mode (only the repository lists are currently
  displayed)
* status: --fast is back
This commit is contained in:
Joey Hess 2011-11-14 19:27:00 -04:00
parent 02f1d5467a
commit bfe38f8ff1
5 changed files with 41 additions and 10 deletions

View file

@ -16,8 +16,12 @@ import Text.JSON
import qualified Utility.JSONStream as Stream
start :: String -> String -> IO ()
start command file = putStr $ Stream.start [("command", command), ("file", file)]
start :: String -> Maybe String -> IO ()
start command file =
putStr $ Stream.start $ ("command", command) : filepart file
where
filepart Nothing = []
filepart (Just f) = [("file", f)]
end :: Bool -> IO ()
end b = putStr $ Stream.add [("success", b)] ++ Stream.end