diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/LsTree.hs | 11 | ||||
-rw-r--r-- | Git/Repair.hs | 2 |
2 files changed, 7 insertions, 6 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. -} diff --git a/Git/Repair.hs b/Git/Repair.hs index 46cf22123..b441f1337 100644 --- a/Git/Repair.hs +++ b/Git/Repair.hs @@ -341,7 +341,7 @@ verifyTree :: MissingObjects -> Sha -> Repo -> IO Bool verifyTree missing treesha r | S.member treesha missing = return False | otherwise = do - (ls, cleanup) <- pipeNullSplit (LsTree.lsTreeParams treesha) r + (ls, cleanup) <- pipeNullSplit (LsTree.lsTreeParams treesha []) r let objshas = map (extractSha . LsTree.sha . LsTree.parseLsTree) ls if any isNothing objshas || any (`S.member` missing) (catMaybes objshas) then do |