only simplify Version differences
Eg, [ObjectHashLower True, ObjectHashLower False] is not the same as [ObjectHashLower False]
This commit is contained in:
parent
399f7904d7
commit
354de19cbe
1 changed files with 1 additions and 5 deletions
|
@ -68,8 +68,7 @@ instance Monoid Differences where
|
||||||
defver :: Difference
|
defver :: Difference
|
||||||
defver = Version 5
|
defver = Version 5
|
||||||
|
|
||||||
-- Larger values of the same Difference constructor dominate
|
-- Given [Version 6, Version 5], returns [Version 6]
|
||||||
-- over smaller values, so given [Version 6, Version 5], returns [Version 6]
|
|
||||||
simplify :: [Difference] -> [Difference]
|
simplify :: [Difference] -> [Difference]
|
||||||
simplify = go . sort
|
simplify = go . sort
|
||||||
where
|
where
|
||||||
|
@ -80,9 +79,6 @@ simplify = go . sort
|
||||||
| otherwise = d1 : go (d2:ds)
|
| otherwise = d1 : go (d2:ds)
|
||||||
|
|
||||||
like (Version _) (Version _) = True
|
like (Version _) (Version _) = True
|
||||||
like (ObjectHashLower _) (ObjectHashLower _) = True
|
|
||||||
like (ObjectHashDirectories _) (ObjectHashDirectories _) = True
|
|
||||||
like (BranchHashDirectories _) (BranchHashDirectories _) = True
|
|
||||||
like _ _ = False
|
like _ _ = False
|
||||||
|
|
||||||
getDifferences :: Git.Repo -> Differences
|
getDifferences :: Git.Repo -> Differences
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue