summaryrefslogtreecommitdiff
path: root/Creds.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Creds.hs')
-rw-r--r--Creds.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Creds.hs b/Creds.hs
index 0586f2070..7273ed966 100644
--- a/Creds.hs
+++ b/Creds.hs
@@ -14,6 +14,7 @@ module Creds (
getEnvCredPair,
writeCacheCreds,
readCacheCreds,
+ removeCreds,
) where
import Common.Annex
@@ -138,3 +139,9 @@ decodeCredPair :: Creds -> Maybe CredPair
decodeCredPair creds = case lines creds of
l:p:[] -> Just (l, p)
_ -> Nothing
+
+removeCreds :: FilePath -> Annex ()
+removeCreds file = do
+ d <- fromRepo gitAnnexCredsDir
+ let f = d </> file
+ liftIO $ nukeFile f