more RawFilePath conversion

Added a RawFilePath createDirectory and kept making stuff build.

Up to 296/645

This commit was sponsored by Mark Reidenbach on Patreon.
This commit is contained in:
Joey Hess 2020-10-28 17:25:59 -04:00
parent b8bd2e45e3
commit 8d66f7ba0f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
18 changed files with 95 additions and 76 deletions

10
Git.hs
View file

@ -43,6 +43,7 @@ import Network.URI (uriPath, uriScheme, unEscapeString)
#ifndef mingw32_HOST_OS
import System.Posix.Files
#endif
import qualified System.FilePath.ByteString as P
import Common
import Git.Types
@ -133,14 +134,13 @@ assertLocal repo action
| otherwise = action
{- Path to a repository's gitattributes file. -}
attributes :: Repo -> FilePath
attributes :: Repo -> RawFilePath
attributes repo
| repoIsLocalBare repo = attributesLocal repo
| otherwise = fromRawFilePath (repoPath repo) </> ".gitattributes"
| otherwise = repoPath repo P.</> ".gitattributes"
attributesLocal :: Repo -> FilePath
attributesLocal repo = fromRawFilePath (localGitDir repo)
</> "info" </> "attributes"
attributesLocal :: Repo -> RawFilePath
attributesLocal repo = localGitDir repo P.</> "info" P.</> "attributes"
{- Path to a given hook script in a repository, only if the hook exists
- and is executable. -}