From f768f16999d997077be98c0d8eabd3d85fd8caa5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 3 Apr 2013 17:01:40 -0400 Subject: detect when unwanted remote is empty and remove it Needs fixes to build when the webapp is disabled. --- Logs/Group.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Logs') diff --git a/Logs/Group.hs b/Logs/Group.hs index c08feffde..85906f0a7 100644 --- a/Logs/Group.hs +++ b/Logs/Group.hs @@ -13,6 +13,7 @@ module Logs.Group ( groupMap, groupMapLoad, getStandardGroup, + inUnwantedGroup ) where import qualified Data.Map as M @@ -74,3 +75,7 @@ getStandardGroup :: S.Set Group -> Maybe StandardGroup getStandardGroup s = case mapMaybe toStandardGroup $ S.toList s of [g] -> Just g _ -> Nothing + +inUnwantedGroup :: UUID -> Annex Bool +inUnwantedGroup u = elem UnwantedGroup + . mapMaybe toStandardGroup . S.toList <$> lookupGroups u -- cgit v1.2.3