add comment about relative/absolute filenames
This commit is contained in:
parent
5a9e3f7377
commit
fa5c016585
1 changed files with 3 additions and 0 deletions
3
Git.hs
3
Git.hs
|
@ -547,6 +547,9 @@ configMap = config
|
||||||
{- Efficiently looks up a gitattributes value for each file in a list. -}
|
{- Efficiently looks up a gitattributes value for each file in a list. -}
|
||||||
checkAttr :: Repo -> String -> [FilePath] -> IO [(FilePath, String)]
|
checkAttr :: Repo -> String -> [FilePath] -> IO [(FilePath, String)]
|
||||||
checkAttr repo attr files = do
|
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
|
cwd <- getCurrentDirectory
|
||||||
let relfiles = map (relPathDirToFile cwd . absPathFrom cwd) files
|
let relfiles = map (relPathDirToFile cwd . absPathFrom cwd) files
|
||||||
(_, fromh, toh) <- hPipeBoth "git" (toCommand params)
|
(_, fromh, toh) <- hPipeBoth "git" (toCommand params)
|
||||||
|
|
Loading…
Reference in a new issue