From 4ca49833db99df1abf04c9835031925dd8ca2429 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 Oct 2013 15:50:26 -0400 Subject: fix lsTreeFiles to use --full-tree This makes it show the full tree, not just the current directory, and enables --full-name, which yields TopFilePaths. --- Git/LsTree.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Git/LsTree.hs b/Git/LsTree.hs index 031dba0cf..a2b47da3a 100644 --- a/Git/LsTree.hs +++ b/Git/LsTree.hs @@ -30,7 +30,8 @@ data TreeItem = TreeItem , file :: TopFilePath } deriving Show -{- Lists the complete contents of a tree, with lazy output. -} +{- Lists the complete contents of a tree, recursing into sub-trees, + - with lazy output. -} lsTree :: Ref -> Repo -> IO [TreeItem] lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo where @@ -40,7 +41,7 @@ lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem] lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo where - ps = [Params "ls-tree -z --", File $ show t] ++ map File fs + ps = [Params "ls-tree --full-tree -z --", File $ show t] ++ map File fs {- Parses a line of ls-tree output. - (The --long format is not currently supported.) -} -- cgit v1.2.3