summaryrefslogtreecommitdiff
path: root/Git/Types.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 14:59:35 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 15:14:47 -0400
commit063e26fb58d6f835b9325e280f322eb5788ca660 (patch)
tree433d5bbabf0eeba0ab0e2afd8c9a7994bdb5863d /Git/Types.hs
parentc5df5fd4fa172782fee20f966b04c3793df140a1 (diff)
add catCommit, with commit object parser
Diffstat (limited to 'Git/Types.hs')
-rw-r--r--Git/Types.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Git/Types.hs b/Git/Types.hs
index 1eef2f743..e694c2072 100644
--- a/Git/Types.hs
+++ b/Git/Types.hs
@@ -97,3 +97,18 @@ toBlobType 0o100644 = Just FileBlob
toBlobType 0o100755 = Just ExecutableBlob
toBlobType 0o120000 = Just SymlinkBlob
toBlobType _ = Nothing
+
+data Commit = Commit
+ { commitTree :: Sha
+ , commitAuthorMetaData :: CommitMetaData
+ , commitCommitterMetaData :: CommitMetaData
+ , commitMessage :: String
+ }
+ deriving (Show)
+
+data CommitMetaData = CommitMetaData
+ { commitName :: Maybe String
+ , commitEmail :: Maybe String
+ , commitDate :: Maybe String -- In raw git form, "epoch -tzoffset"
+ }
+ deriving (Show)