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.
This commit is contained in:
Joey Hess 2012-02-01 16:05:02 -04:00
parent 6c64a214fa
commit 3d49258e5b
9 changed files with 36 additions and 29 deletions

View file

@ -7,7 +7,7 @@
module Command.Uninit where
import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.Text.Lazy as L
import Common.Annex
import Command
@ -29,7 +29,7 @@ check = do
when (b == Annex.Branch.name) $ error $
"cannot uninit when the " ++ show b ++ " branch is checked out"
where
current_branch = Git.Ref . Prelude.head . lines . B.unpack <$> revhead
current_branch = Git.Ref . Prelude.head . lines . L.unpack <$> revhead
revhead = inRepo $ Git.Command.pipeRead
[Params "rev-parse --abbrev-ref HEAD"]