summaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-24 19:23:18 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-24 19:23:18 -0400
commit819389465d4caedd10e905f0945c60e3fc67c8ea (patch)
tree7c722fbf22d2461fd38fe1986d157de322c17922 /Git.hs
parent378417c70338418ce2fd42643cad5b2f31d7ed8e (diff)
parenta9b36eb958b2dec1cefefe92262965b0f7dceb27 (diff)
Merge branch 'smudge'
Diffstat (limited to 'Git.hs')
-rw-r--r--Git.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Git.hs b/Git.hs
index 1bc789f85..6f7769c87 100644
--- a/Git.hs
+++ b/Git.hs
@@ -28,6 +28,7 @@ module Git (
repoPath,
localGitDir,
attributes,
+ attributesLocal,
hookPath,
assertLocal,
adjustPath,
@@ -125,8 +126,11 @@ assertLocal repo action
{- Path to a repository's gitattributes file. -}
attributes :: Repo -> FilePath
attributes repo
- | repoIsLocalBare repo = repoPath repo ++ "/info/.gitattributes"
- | otherwise = repoPath repo ++ "/.gitattributes"
+ | repoIsLocalBare repo = attributesLocal repo
+ | otherwise = repoPath repo </> ".gitattributes"
+
+attributesLocal :: Repo -> FilePath
+attributesLocal repo = localGitDir repo </> "info" </> "attributes"
{- Path to a given hook script in a repository, only if the hook exists
- and is executable. -}