From 3b74dc8be8d613de3aac3147ebf7e3b83c67cd54 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 25 Feb 2016 15:34:22 -0400 Subject: [PATCH] add fromBlobType --- Git/Types.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Git/Types.hs b/Git/Types.hs index e694c20723..4fa49be5c0 100644 --- a/Git/Types.hs +++ b/Git/Types.hs @@ -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