diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-22 12:58:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-22 12:58:04 -0400 |
commit | 034d6fec96f30c479f79a5826ef79b2414545b1f (patch) | |
tree | 3dad79d984dca06dd9cb60054b0ff08994e19652 /Git/Types.hs | |
parent | e0f2ec01ceafb0ee3fdd68ef025e1ee31071b13a (diff) |
index file recovery
Diffstat (limited to 'Git/Types.hs')
-rw-r--r-- | Git/Types.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Git/Types.hs b/Git/Types.hs index 4765aad6c..abfb99f9f 100644 --- a/Git/Types.hs +++ b/Git/Types.hs @@ -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 |