add fromBlobType

This commit is contained in:
Joey Hess 2016-02-25 15:34:22 -04:00
parent 7b2496508f
commit 3b74dc8be8
Failed to extract signature

View file

@ -98,6 +98,11 @@ toBlobType 0o100755 = Just ExecutableBlob
toBlobType 0o120000 = Just SymlinkBlob
toBlobType _ = Nothing
fromBlobType :: BlobType -> FileMode
fromBlobType FileBlob = 0o100644
fromBlobType ExecutableBlob = 0o100755
fromBlobType SymlinkBlob = 0o120000
data Commit = Commit
{ commitTree :: Sha
, commitAuthorMetaData :: CommitMetaData