capability reply must be a subset of what git sent so filter it
This commit is contained in:
parent
d0dfee1519
commit
c6884989dc
1 changed files with 3 additions and 3 deletions
|
@ -70,11 +70,11 @@ versionPkt = formatKV "version" fromVersion
|
||||||
-- the Server.
|
-- the Server.
|
||||||
handshake
|
handshake
|
||||||
:: (Role -> Either String Role) -- ^ role selection function
|
:: (Role -> Either String Role) -- ^ role selection function
|
||||||
-> ([Capability] -> [Capability]) -- ^ capability selection function
|
-> (Capability -> Bool) -- ^ capability selection function
|
||||||
-> Handle -- ^ handle to receive data from git
|
-> Handle -- ^ handle to receive data from git
|
||||||
-> Handle -- ^ handle to send data to git
|
-> Handle -- ^ handle to send data to git
|
||||||
-> IO (Either String (Role, [Capability]))
|
-> IO (Either String (Role, [Capability]))
|
||||||
handshake selectrole selectcapabilities input output =
|
handshake selectrole selectcapability input output =
|
||||||
getpkt pktRole $ \role ->
|
getpkt pktRole $ \role ->
|
||||||
checkversion $ do
|
checkversion $ do
|
||||||
case selectrole role of
|
case selectrole role of
|
||||||
|
@ -120,7 +120,7 @@ handshake selectrole selectcapabilities input output =
|
||||||
"git is using an unsupported protocol version: " ++ show versions
|
"git is using an unsupported protocol version: " ++ show versions
|
||||||
|
|
||||||
exchangecaps cnt = getpkts pktCapability $ \caps -> do
|
exchangecaps cnt = getpkts pktCapability $ \caps -> do
|
||||||
let mycaps = selectcapabilities caps
|
let mycaps = filter selectcapability caps
|
||||||
sendpkts capabilityPkt mycaps $
|
sendpkts capabilityPkt mycaps $
|
||||||
cnt mycaps
|
cnt mycaps
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue