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:
parent
279991604d
commit
d5d8259937
12 changed files with 77 additions and 52 deletions
|
@ -90,7 +90,7 @@ updateIndexLine :: Sha -> TreeItemType -> TopFilePath -> L.ByteString
|
|||
updateIndexLine sha treeitemtype file = L.fromStrict $
|
||||
fmtTreeItemType treeitemtype
|
||||
<> " blob "
|
||||
<> fromRef sha
|
||||
<> fromRef' sha
|
||||
<> "\t"
|
||||
<> indexPath file
|
||||
|
||||
|
@ -108,7 +108,7 @@ unstageFile file repo = do
|
|||
unstageFile' :: TopFilePath -> Streamer
|
||||
unstageFile' p = pureStreamer $ L.fromStrict $
|
||||
"0 "
|
||||
<> fromRef deleteSha
|
||||
<> fromRef' deleteSha
|
||||
<> "\t"
|
||||
<> indexPath p
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue