diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-02-06 13:03:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-02-06 13:03:55 -0400 |
commit | 465da37961ea77a30363d2193e625c5781bd9302 (patch) | |
tree | 020054765eee8af0b03a131a16eff7c4f2c2688f /Messages/JSON.hs | |
parent | 34276bb91c9a36854d215ae50bfba2e207a6e6a4 (diff) |
Added INFO to external special remote protocol.
It's left up to the special remote to detect when git-annex is new enough
to support the message; an old git-annex will blow up.
This commit was supported by the NSF-funded DataLad project.
Diffstat (limited to 'Messages/JSON.hs')
-rw-r--r-- | Messages/JSON.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Messages/JSON.hs b/Messages/JSON.hs index 3ad0e5708..6ca3c1383 100644 --- a/Messages/JSON.hs +++ b/Messages/JSON.hs @@ -15,6 +15,7 @@ module Messages.JSON ( start, end, note, + info, add, complete, progress, @@ -77,6 +78,11 @@ note :: String -> JSONBuilder note s (Just (o, e)) = Just (HM.insert "note" (toJSON s) o, e) note _ Nothing = Nothing +info :: String -> JSONBuilder +info s _ = Just (o, True) + where + Object o = object ["info" .= toJSON s] + data JSONChunk v where AesonObject :: Object -> JSONChunk Object JSONChunk :: ToJSON v => [(String, v)] -> JSONChunk [(String, v)] |