summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-11 23:49:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-11 23:49:58 -0400
commitfa5c016585b61e84c9ef7e7f6e6814693599a66a (patch)
tree4c05b608286a8c45270f9d55d49a0604bd2ee058
parent5a9e3f73772daff3ffadd2359d99914f0567b78c (diff)
add comment about relative/absolute filenames
-rw-r--r--Git.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Git.hs b/Git.hs
index fb998b1b0..044fc08ae 100644
--- a/Git.hs
+++ b/Git.hs
@@ -547,6 +547,9 @@ 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
+ -- git check-attr needs relative filenames input; it will choke
+ -- on some absolute filenames. This also means it will output
+ -- all relative filenames.
cwd <- getCurrentDirectory
let relfiles = map (relPathDirToFile cwd . absPathFrom cwd) files
(_, fromh, toh) <- hPipeBoth "git" (toCommand params)