index file recovery
This commit is contained in:
parent
5673fbbd72
commit
3e61749d08
6 changed files with 69 additions and 16 deletions
|
@ -9,6 +9,7 @@ module Git.Types where
|
|||
|
||||
import Network.URI
|
||||
import qualified Data.Map as M
|
||||
import System.Posix.Types
|
||||
|
||||
{- Support repositories on local disk, and repositories accessed via an URL.
|
||||
-
|
||||
|
@ -81,3 +82,9 @@ readBlobType "100644" = Just FileBlob
|
|||
readBlobType "100755" = Just ExecutableBlob
|
||||
readBlobType "120000" = Just SymlinkBlob
|
||||
readBlobType _ = Nothing
|
||||
|
||||
toBlobType :: FileMode -> Maybe BlobType
|
||||
toBlobType 0o100644 = Just FileBlob
|
||||
toBlobType 0o100755 = Just ExecutableBlob
|
||||
toBlobType 0o120000 = Just SymlinkBlob
|
||||
toBlobType _ = Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue