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. --- Remote.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Remote.hs') diff --git a/Remote.hs b/Remote.hs index 7affb93af..27e69a5a0 100644 --- a/Remote.hs +++ b/Remote.hs @@ -28,6 +28,7 @@ module Remote ( byCost, prettyPrintUUIDs, prettyListUUIDs, + prettyUUID, remoteFromUUID, remotesWithUUID, remotesWithoutUUID, @@ -159,6 +160,10 @@ prettyListUUIDs uuids = do where n = finddescription m u +{- Nice display of a remote's name and/or description. -} +prettyUUID :: UUID -> Annex String +prettyUUID u = concat <$> prettyListUUIDs [u] + {- Gets the remote associated with a UUID. - There's no associated remote when this is the UUID of the local repo. -} remoteFromUUID :: UUID -> Annex (Maybe Remote) -- cgit v1.2.3