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:
parent
88c172bbee
commit
edbf177628
1 changed files with 3 additions and 2 deletions
|
@ -30,7 +30,8 @@ data TreeItem = TreeItem
|
||||||
, file :: TopFilePath
|
, file :: TopFilePath
|
||||||
} deriving Show
|
} 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 :: Ref -> Repo -> IO [TreeItem]
|
||||||
lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo
|
lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo
|
||||||
where
|
where
|
||||||
|
@ -40,7 +41,7 @@ lsTree t repo = map parseLsTree <$> pipeNullSplitZombie ps repo
|
||||||
lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem]
|
lsTreeFiles :: Ref -> [FilePath] -> Repo -> IO [TreeItem]
|
||||||
lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo
|
lsTreeFiles t fs repo = map parseLsTree <$> pipeNullSplitStrict ps repo
|
||||||
where
|
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.
|
{- Parses a line of ls-tree output.
|
||||||
- (The --long format is not currently supported.) -}
|
- (The --long format is not currently supported.) -}
|
||||||
|
|
Loading…
Add table
Reference in a new issue