diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-01 16:05:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-01 16:16:08 -0400 |
commit | 3d49258e5bed4d9a6ec9e24ddb776f277542664b (patch) | |
tree | 89af32cbdde6a5e672c357c24fe281337e2a133a /Git/LsTree.hs | |
parent | 6c64a214fa569dcf1fa8cc4c79efd90d01ff5705 (diff) |
attempt at a quick, utf-8 only fix to the ghc 7.4 problem
If you have only utf-8 filenames, and need to build git-annex with ghc 7.4,
this will work. But, it will crash on non-utf-8 filenames.
Diffstat (limited to 'Git/LsTree.hs')
-rw-r--r-- | Git/LsTree.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Git/LsTree.hs b/Git/LsTree.hs index aae7f1263..5c1541819 100644 --- a/Git/LsTree.hs +++ b/Git/LsTree.hs @@ -14,7 +14,7 @@ module Git.LsTree ( import Numeric import Control.Applicative import System.Posix.Types -import qualified Data.ByteString.Lazy.Char8 as L +import qualified Data.Text.Lazy as L import Common import Git @@ -31,11 +31,11 @@ data TreeItem = TreeItem {- Lists the contents of a Ref -} lsTree :: Ref -> Repo -> IO [TreeItem] lsTree t repo = map parseLsTree <$> - pipeNullSplitB [Params "ls-tree --full-tree -z -r --", File $ show t] repo + pipeNullSplitT [Params "ls-tree --full-tree -z -r --", File $ show t] repo {- Parses a line of ls-tree output. - (The --long format is not currently supported.) -} -parseLsTree :: L.ByteString -> TreeItem +parseLsTree :: L.Text -> TreeItem parseLsTree l = TreeItem { mode = fst $ Prelude.head $ readOct $ L.unpack m , typeobj = L.unpack t |