summaryrefslogtreecommitdiff
path: root/Remote/GitRemote.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/GitRemote.hs')
-rw-r--r--Remote/GitRemote.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Remote/GitRemote.hs b/Remote/GitRemote.hs
index 8671ef7fa..43e75b97b 100644
--- a/Remote/GitRemote.hs
+++ b/Remote/GitRemote.hs
@@ -47,7 +47,7 @@ genRemote r = do
name = Git.repoDescribe r,
storeKey = copyToRemote r,
retrieveKeyFile = copyFromRemote r,
- removeKey = error "TODO Remote.GitRemote.removeKey",
+ removeKey = dropKey r,
hasKey = inAnnex r,
hasKeyCheap = not (Git.repoIsUrl r)
}
@@ -159,6 +159,13 @@ inAnnex r key = if Git.repoIsUrl r
inannex <- onRemote r (boolSystem, False) "inannex"
[Param (show key)]
return $ Right inannex
+
+dropKey :: Git.Repo -> Key -> Annex Bool
+dropKey r key =
+ onRemote r (boolSystem, False) "dropkey"
+ [ Params "--quiet --force"
+ , Param $ show key
+ ]
{- Tries to copy a key's content from a remote's annex to a file. -}
copyFromRemote :: Git.Repo -> Key -> FilePath -> Annex Bool