ByteString Ref continued

Attoparsec parser for diff-tree.

Changed fromRef back to producing a String, to avoid needing to convert
every use of it. However, this does mean I'm going to miss some
opportunities where fromRef is used and the result converted back to a
ByteString. Would be worth revisiting that at some point maybe.
This commit is contained in:
Joey Hess 2020-04-07 11:54:27 -04:00
parent 279991604d
commit d5d8259937
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 77 additions and 52 deletions

View file

@ -21,7 +21,7 @@ get b = getMulti [b]
{- Gets reflogs for multiple branches. -}
getMulti :: [Branch] -> Repo -> IO [Sha]
getMulti bs = get' (map (Param . decodeBS' . fromRef) bs)
getMulti bs = get' (map (Param . fromRef) bs)
get' :: [CommandParam] -> Repo -> IO [Sha]
get' ps = mapMaybe (extractSha . S.copy) . S8.lines <$$> pipeReadStrict ps'