Fix support for readonly git remotes

Boolean blindness oops.

(Reversion in version 8.20210621)

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2021-08-30 12:34:19 -04:00
parent b083f9ec2f
commit 837116ef1e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 17 additions and 2 deletions

View file

@ -75,7 +75,7 @@ runReader a = do
v <- a (SQL.ReadHandle qh)
return (v, st)
go DbClosed = do
st' <- openDb True DbClosed
st' <- openDb False DbClosed
v <- case st' of
(DbOpen qh) -> a (SQL.ReadHandle qh)
_ -> return mempty
@ -97,7 +97,7 @@ runWriter a = do
v <- a (SQL.WriteHandle qh)
return (v, st)
go st = do
st' <- openDb False st
st' <- openDb True st
v <- case st' of
DbOpen qh -> a (SQL.WriteHandle qh)
_ -> error "internal"