summaryrefslogtreecommitdiff
path: root/Messages
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-14 19:27:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-14 19:27:22 -0400
commitbfe38f8ff16dc6ccc32d545e6fed87817caa26cf (patch)
tree65efec376ee385efe5d538aa2453b7b925e8aee5 /Messages
parent02f1d5467ad05315905b9cb90307049ababb4a63 (diff)
status --json --fast for esc
* status: Fix --json mode (only the repository lists are currently displayed) * status: --fast is back
Diffstat (limited to 'Messages')
-rw-r--r--Messages/JSON.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Messages/JSON.hs b/Messages/JSON.hs
index fb95f550e..a325ef130 100644
--- a/Messages/JSON.hs
+++ b/Messages/JSON.hs
@@ -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