summaryrefslogtreecommitdiff
path: root/Git/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-02-24 19:40:14 -0400
committerJoey Hess <joey@kitenet.net>2014-02-24 19:40:14 -0400
commit878e7471fa09dcc36b478e1ac1fd305d5a90b7bf (patch)
treed552b8faa43078e3dfe1f8b10063ec566eced4e2 /Git/Types.hs
parentd80c547a7d1261f158148ca85e627cc2ecb005f2 (diff)
downloadgit-repair-878e7471fa09dcc36b478e1ac1fd305d5a90b7bf.tar.gz
merge from git-annex
Diffstat (limited to 'Git/Types.hs')
-rw-r--r--Git/Types.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Git/Types.hs b/Git/Types.hs
index e63e930..8029225 100644
--- a/Git/Types.hs
+++ b/Git/Types.hs
@@ -47,16 +47,20 @@ type RemoteName = String
{- A git ref. Can be a sha1, or a branch or tag name. -}
newtype Ref = Ref String
- deriving (Eq, Ord)
+ deriving (Eq, Ord, Read, Show)
-instance Show Ref where
- show (Ref v) = v
+fromRef :: Ref -> String
+fromRef (Ref s) = s
{- Aliases for Ref. -}
type Branch = Ref
type Sha = Ref
type Tag = Ref
+{- A date in the format described in gitrevisions. Includes the
+ - braces, eg, "{yesterday}" -}
+newtype RefDate = RefDate String
+
{- Types of objects that can be stored in git. -}
data ObjectType = BlobObject | CommitObject | TreeObject
deriving (Eq)