started converting Ref from String to ByteString
This should make code that reads shas and refs from git faster. Does not compile yet, a lot needs to be done still.
This commit is contained in:
parent
6e9714612b
commit
279991604d
17 changed files with 80 additions and 51 deletions
|
@ -28,6 +28,7 @@ import Foreign.C.Types
|
|||
import Key
|
||||
import Utility.InodeCache
|
||||
import Utility.FileSize
|
||||
import Utility.FileSystemEncoding
|
||||
import Git.Types
|
||||
import Types.UUID
|
||||
import Types.Import
|
||||
|
@ -94,10 +95,10 @@ newtype SSha = SSha String
|
|||
deriving (Eq, Show)
|
||||
|
||||
toSSha :: Sha -> SSha
|
||||
toSSha (Ref s) = SSha s
|
||||
toSSha (Ref s) = SSha (decodeBS' s)
|
||||
|
||||
fromSSha :: SSha -> Ref
|
||||
fromSSha (SSha s) = Ref s
|
||||
fromSSha (SSha s) = Ref (encodeBS' s)
|
||||
|
||||
instance PersistField SSha where
|
||||
toPersistValue (SSha b) = toPersistValue b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue