more RawFilePath conversion

Most of Git/ builds now.

Notable win is toTopFilePath no longer double converts

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
This commit is contained in:
Joey Hess 2020-10-28 15:40:50 -04:00
parent d6e94a6b2e
commit 08cbaee1f8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
15 changed files with 105 additions and 76 deletions

View file

@ -11,6 +11,7 @@ import Common
import Git
import Utility.Env
import Utility.Env.Set
import Utility.Path.AbsRel
indexEnv :: String
indexEnv = "GIT_INDEX_FILE"
@ -27,7 +28,7 @@ indexEnv = "GIT_INDEX_FILE"
- So, an absolute path is the only safe option for this to return.
-}
indexEnvVal :: FilePath -> IO String
indexEnvVal = absPath
indexEnvVal p = fromRawFilePath <$> absPath (toRawFilePath p)
{- Forces git to use the specified index file.
-