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.
This commit is contained in:
parent
5c8150c6eb
commit
7d9f0e0fbe
9 changed files with 59 additions and 8 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue