From 354de19cbe3629d43a37671ee7b2dcfcfd9edc29 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Jan 2015 13:18:19 -0400 Subject: [PATCH] only simplify Version differences Eg, [ObjectHashLower True, ObjectHashLower False] is not the same as [ObjectHashLower False] --- Types/Difference.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Types/Difference.hs b/Types/Difference.hs index cbfad0fceb..7d0c282247 100644 --- a/Types/Difference.hs +++ b/Types/Difference.hs @@ -68,8 +68,7 @@ instance Monoid Differences where defver :: Difference defver = Version 5 --- Larger values of the same Difference constructor dominate --- over smaller values, so given [Version 6, Version 5], returns [Version 6] +-- Given [Version 6, Version 5], returns [Version 6] simplify :: [Difference] -> [Difference] simplify = go . sort where @@ -80,9 +79,6 @@ simplify = go . sort | otherwise = d1 : go (d2:ds) like (Version _) (Version _) = True - like (ObjectHashLower _) (ObjectHashLower _) = True - like (ObjectHashDirectories _) (ObjectHashDirectories _) = True - like (BranchHashDirectories _) (BranchHashDirectories _) = True like _ _ = False getDifferences :: Git.Repo -> Differences