summaryrefslogtreecommitdiff
path: root/Git/CheckAttr.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-10 19:20:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-10 19:20:14 -0400
commit899f84a217681833146fadd8f30cd25ed1a9f653 (patch)
tree37351958f69f8afef17b96966a30ca2dde79ba1c /Git/CheckAttr.hs
parent465c36e8f6a45b888e8f7be8baa52f0eb1759f77 (diff)
export CreateProcess fields from Utility.Process
update code to avoid cwd and env redefinition warnings
Diffstat (limited to 'Git/CheckAttr.hs')
-rw-r--r--Git/CheckAttr.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Git/CheckAttr.hs b/Git/CheckAttr.hs
index 94ead5b4c..6b5e3bf62 100644
--- a/Git/CheckAttr.hs
+++ b/Git/CheckAttr.hs
@@ -23,9 +23,9 @@ type Attr = String
- values and returns a handle. -}
checkAttrStart :: [Attr] -> Repo -> IO CheckAttrHandle
checkAttrStart attrs repo = do
- cwd <- getCurrentDirectory
+ currdir <- getCurrentDirectory
h <- CoProcess.rawMode =<< gitCoProcessStart True params repo
- return (h, attrs, cwd)
+ return (h, attrs, currdir)
where
params =
[ Param "check-attr"
@@ -38,7 +38,7 @@ checkAttrStop (h, _, _) = CoProcess.stop h
{- Gets an attribute of a file. -}
checkAttr :: CheckAttrHandle -> Attr -> FilePath -> IO String
-checkAttr (h, attrs, cwd) want file = do
+checkAttr (h, attrs, currdir) want file = do
pairs <- CoProcess.query h send (receive "")
let vals = map snd $ filter (\(attr, _) -> attr == want) pairs
case vals of
@@ -83,8 +83,8 @@ checkAttr (h, attrs, cwd) want file = do
- so use relative filenames. -}
oldgit = Git.BuildVersion.older "1.7.7"
file'
- | oldgit = absPathFrom cwd file
- | otherwise = relPathDirToFile cwd $ absPathFrom cwd file
+ | oldgit = absPathFrom currdir file
+ | otherwise = relPathDirToFile currdir $ absPathFrom currdir file
oldattrvalue attr l = end bits !! 0
where
bits = split sep l