summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-18 15:50:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-18 15:50:26 -0400
commit4ca49833db99df1abf04c9835031925dd8ca2429 (patch)
tree736c3d10abfef0cda5f4dff88d798c29d30c25af /Git
parent711786ee02b520795348be0f8745264eebc50ddc (diff)
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.
Diffstat (limited to 'Git')
-rw-r--r--Git/LsTree.hs5
1 files 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.) -}