force files relative

Other code is currently depending on checkAttr forcing absolute filenames
to relative, so keep it doing so.

This is a quick fix, and should sometime be moved elsewhere.
This commit is contained in:
Joey Hess 2011-10-11 23:39:29 -04:00
parent 11b154e811
commit 5a9e3f7377

4
Git.hs
View file

@ -547,10 +547,12 @@ configMap = config
{- Efficiently looks up a gitattributes value for each file in a list. -}
checkAttr :: Repo -> String -> [FilePath] -> IO [(FilePath, String)]
checkAttr repo attr files = do
cwd <- getCurrentDirectory
let relfiles = map (relPathDirToFile cwd . absPathFrom cwd) files
(_, fromh, toh) <- hPipeBoth "git" (toCommand params)
_ <- forkProcess $ do
hClose fromh
hPutStr toh $ join "\0" files
hPutStr toh $ join "\0" relfiles
hClose toh
exitSuccess
hClose toh