mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Use the deleting/inserting helpers.
This commit is contained in:
parent
e1d8a98b22
commit
4e131c84d9
@ -46,8 +46,8 @@ diffBlobPair decorator blobs = do
|
||||
terms <- Async.mapConcurrently (parseBlob decorator) blobs
|
||||
pure $ case (runJoin blobs, runJoin terms) of
|
||||
((left, right), (a, b)) | nonExistentBlob left && nonExistentBlob right -> Nothing
|
||||
| nonExistentBlob right -> Just . pure $ Delete a
|
||||
| nonExistentBlob left -> Just . pure $ Insert b
|
||||
| nonExistentBlob right -> Just $ deleting a
|
||||
| nonExistentBlob left -> Just $ inserting b
|
||||
| otherwise -> Just $ runDiff (both a b)
|
||||
where
|
||||
runDiff terms = runBothWith diffTerms terms
|
||||
|
Loading…
Reference in New Issue
Block a user