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:
parent
993e6459a3
commit
91db540769
4 changed files with 53 additions and 7 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue