summaryrefslogtreecommitdiff
path: root/Git/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Types.hs')
-rw-r--r--Git/Types.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Git/Types.hs b/Git/Types.hs
index e694c2072..4fa49be5c 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