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:
parent
b8bd2e45e3
commit
8d66f7ba0f
18 changed files with 95 additions and 76 deletions
10
Git.hs
10
Git.hs
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue