add catCommit, with commit object parser
This commit is contained in:
parent
be2e9427ad
commit
1f91d1d0b7
3 changed files with 77 additions and 1 deletions
15
Git/Types.hs
15
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue