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.
This commit is contained in:
Joey Hess 2013-10-18 15:50:26 -04:00
parent 88c172bbee
commit edbf177628

View file

@ -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.) -}