tiny little protocol between git-remote-daemon and git-annex-shell
Subset of the git-remote-daemon protocol.
This commit is contained in:
parent
9b3ca5894b
commit
e0b04f2e37
2 changed files with 29 additions and 2 deletions
29
RemoteDaemon/Endpoint/GitAnnexShell/Types.hs
Normal file
29
RemoteDaemon/Endpoint/GitAnnexShell/Types.hs
Normal file
|
@ -0,0 +1,29 @@
|
|||
{- git-remote-daemon, git-annex-shell endpoint, datatypes
|
||||
-
|
||||
- Copyright 2014 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
|
||||
module RemoteDaemon.EndPoint.GitAnnexShell.Types where
|
||||
|
||||
import Common.Annex
|
||||
import qualified Git.Types as Git
|
||||
import qualified Utility.SimpleProtocol as Proto
|
||||
import RemoteDaemon.Types (RemoteName, RefList)
|
||||
|
||||
data Notifications
|
||||
= CHANGED RemoteName RefList
|
||||
|
||||
instance Proto.Sendable Notifications where
|
||||
formatMessage (CHANGED remote refs) =
|
||||
["CHANGED"
|
||||
, Proto.serialize remote
|
||||
, Proto.serialize refs
|
||||
]
|
||||
|
||||
instance Proto.Receivable Notifications where
|
||||
parseCommand "CHANGED" = Proto.parse2 CHANGED
|
|
@ -14,8 +14,6 @@ import Common.Annex
|
|||
import qualified Git.Types as Git
|
||||
import qualified Utility.SimpleProtocol as Proto
|
||||
|
||||
import Control.Concurrent.STM
|
||||
|
||||
-- Messages that the daemon emits.
|
||||
data Emitted
|
||||
= CHANGED RemoteName RefList
|
||||
|
|
Loading…
Reference in a new issue