diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/CatFile.hs | 2 | ||||
-rw-r--r-- | Git/LsFiles.hs | 13 | ||||
-rw-r--r-- | Git/LsTree.hs | 7 | ||||
-rw-r--r-- | Git/Remote/Remove.hs | 2 | ||||
-rw-r--r-- | Git/Version.hs | 2 |
5 files changed, 14 insertions, 12 deletions
diff --git a/Git/CatFile.hs b/Git/CatFile.hs index a1a0a0d28..c63a0647c 100644 --- a/Git/CatFile.hs +++ b/Git/CatFile.hs @@ -110,4 +110,4 @@ catTree h treeref = go <$> catObjectDetails h treeref parsemodefile b = let (modestr, file) = separate (== ' ') (decodeBS b) in (file, readmode modestr) - readmode = fst . fromMaybe (0, undefined) . headMaybe . readOct + readmode = fromMaybe 0 . fmap fst . headMaybe . readOct diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs index c23c282d0..e80c1b288 100644 --- a/Git/LsFiles.hs +++ b/Git/LsFiles.hs @@ -181,12 +181,13 @@ parseUnmerged s | otherwise = case words metadata of (rawblobtype:rawsha:rawstage:_) -> do stage <- readish rawstage :: Maybe Int - unless (stage == 2 || stage == 3) $ - fail undefined -- skip stage 1 - blobtype <- readBlobType rawblobtype - sha <- extractSha rawsha - return $ InternalUnmerged (stage == 2) file - (Just blobtype) (Just sha) + if stage /= 2 && stage /= 3 + then Nothing + else do + blobtype <- readBlobType rawblobtype + sha <- extractSha rawsha + return $ InternalUnmerged (stage == 2) file + (Just blobtype) (Just sha) _ -> Nothing where (metadata, file) = separate (== '\t') s diff --git a/Git/LsTree.hs b/Git/LsTree.hs index 7ef951807..8294f7b93 100644 --- a/Git/LsTree.hs +++ b/Git/LsTree.hs @@ -13,10 +13,6 @@ module Git.LsTree ( parseLsTree ) where -import Numeric -import Control.Applicative -import System.Posix.Types - import Common import Git import Git.Command @@ -24,6 +20,9 @@ import Git.Sha import Git.FilePath import qualified Git.Filename +import Numeric +import System.Posix.Types + data TreeItem = TreeItem { mode :: FileMode , typeobj :: String diff --git a/Git/Remote/Remove.hs b/Git/Remote/Remove.hs index 2ffc9b358..e6c13b9ea 100644 --- a/Git/Remote/Remove.hs +++ b/Git/Remote/Remove.hs @@ -1,4 +1,4 @@ -{- git remote stuff +{- git remote removal - - Copyright 2012 Joey Hess <id@joeyh.name> - diff --git a/Git/Version.hs b/Git/Version.hs index ecd12444c..19ff945c8 100644 --- a/Git/Version.hs +++ b/Git/Version.hs @@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# OPTIONS_GHC -fno-warn-tabs #-} + module Git.Version ( installed, older, |