diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-11 15:01:13 -0400 |
commit | 962e279e17c1f3cf3be49ffdfb5e7310711a220c (patch) | |
tree | d9953d9e57dea51c24ccaf4d7e64731010546f4f /Git/Types.hs | |
parent | 7d7f93302c72cbe1a16598b0c90a49c10aaf3669 (diff) | |
download | git-repair-962e279e17c1f3cf3be49ffdfb5e7310711a220c.tar.gz |
merge from git-annex
Diffstat (limited to 'Git/Types.hs')
-rw-r--r-- | Git/Types.hs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Git/Types.hs b/Git/Types.hs index bb91a17..327c1d7 100644 --- a/Git/Types.hs +++ b/Git/Types.hs @@ -11,7 +11,6 @@ import Network.URI import qualified Data.Map as M import System.Posix.Types import Utility.SafeCommand -import Utility.URI () {- Support repositories on local disk, and repositories accessed via an URL. - @@ -40,6 +39,7 @@ data Repo = Repo , remoteName :: Maybe RemoteName -- alternate environment to use when running git commands , gitEnv :: Maybe [(String, String)] + , gitEnvOverridesGitDir :: Bool -- global options to pass to git when running git commands , gitGlobalOpts :: [CommandParam] } deriving (Show, Eq, Ord) @@ -98,3 +98,24 @@ toBlobType 0o100644 = Just FileBlob 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 + , commitParent :: [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) |