From 5a9e3f73772daff3ffadd2359d99914f0567b78c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Oct 2011 23:39:29 -0400 Subject: 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. --- Git.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Git.hs b/Git.hs index 173deba6e..fb998b1b0 100644 --- a/Git.hs +++ b/Git.hs @@ -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 -- cgit v1.2.3