summaryrefslogtreecommitdiff
path: root/Git/Types.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-06 14:26:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-06 14:26:15 -0400
commit91db54076964979b6c50bd7efd0b895c4d416978 (patch)
tree7ba67f302dac7ef03b2cef906ab08bb88c0f8967 /Git/Types.hs
parent993e6459a38817a9062aafae7552a668c2db7a31 (diff)
add support for staging other types of blobs, like symlinks, into the index
Also added a utility TopFilePath type, which could stand to be used more widely.
Diffstat (limited to 'Git/Types.hs')
-rw-r--r--Git/Types.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Git/Types.hs b/Git/Types.hs
index 64d418a04..1df6e343b 100644
--- a/Git/Types.hs
+++ b/Git/Types.hs
@@ -63,3 +63,11 @@ readObjectType "commit" = Just CommitObject
readObjectType "tree" = Just TreeObject
readObjectType _ = Nothing
+{- Types of blobs. -}
+data BlobType = FileBlob | ExecutableBlob | SymlinkBlob
+
+{- Git uses magic numbers to denote the type of a blob. -}
+instance Show BlobType where
+ show FileBlob = "100644"
+ show ExecutableBlob = "100755"
+ show SymlinkBlob = "120000"