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.
This commit is contained in:
Joey Hess 2012-06-06 14:26:15 -04:00
parent 993e6459a3
commit 91db540769
4 changed files with 53 additions and 7 deletions

View file

@ -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"