diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-06 14:21:43 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-06 14:21:43 -0400 |
commit | 620118676391dbd0b296db4d4bf28574c18b9a3c (patch) | |
tree | f96b0b51166c531bfc8d75a9f5bce0557f2cc3b0 /Git/LsTree.hs | |
parent | 2ea34c47dd9819111f3cbaa2ce848581d286c05c (diff) |
refactor ls-tree params
All in one place to avoid bugs like 2ea34c47dd9819111f3cbaa2ce848581d286c05c
Diffstat (limited to 'Git/LsTree.hs')
-rw-r--r-- | Git/LsTree.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Git/LsTree.hs b/Git/LsTree.hs index bce635096..1ed62477e 100644 --- a/Git/LsTree.hs +++ b/Git/LsTree.hs @@ -34,16 +34,17 @@ data TreeItem = TreeItem - with lazy output. -} lsTree :: Ref -> Repo -> IO [TreeItem] lsTree t repo = map parseLsTree - <$> pipeNullSplitZombie (lsTreeParams t) repo + <$> pipeNullSplitZombie (lsTreeParams t []) repo -lsTreeParams :: Ref -> [CommandParam] -lsTreeParams t = +lsTreeParams :: Ref -> [CommandParam] -> [CommandParam] +lsTreeParams r ps = [ Param "ls-tree" , Param "--full-tree" , Param "-z" , Param "-r" - , Param "--" - , File $ fromRef t + ] ++ ps ++ + [ Param "--" + , File $ fromRef r ] {- Lists specified files in a tree. -} |