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
|
@ -43,10 +43,10 @@ applyRefSpec refspec rs getreflog = go [] refspec
|
|||
go c [] = return (reverse c)
|
||||
go c (AddRef r : rest) = go (r:c) rest
|
||||
go c (AddMatching g : rest) =
|
||||
let add = filter (matchGlob g . decodeBS' . fromRef) rs
|
||||
let add = filter (matchGlob g . fromRef) rs
|
||||
in go (add ++ c) rest
|
||||
go c (AddRefLog : rest) = do
|
||||
reflog <- getreflog
|
||||
go (reflog ++ c) rest
|
||||
go c (RemoveMatching g : rest) =
|
||||
go (filter (not . matchGlob g . decodeBS' . fromRef) c) rest
|
||||
go (filter (not . matchGlob g . fromRef) c) rest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue