branch: elpa/hyperdrive
commit 3c521a9960783ac5a73c7b1a0a9e7a169b6e5afd
Author: Joseph Turner <jos...@ushin.org>
Commit: Joseph Turner <jos...@ushin.org>

    Add: (h/history-forget-file) Bound to "F" in history buffers
---
 hyperdrive-history.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 23fbc50976..4d5abfe8b2 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -133,6 +133,7 @@ header, returns an entry whose RANGE-END and version are 
nil."
   "+"   #'h/history-fill-version-ranges
   "w"   #'h/history-copy-url
   "d"   #'h/history-download-file
+  "F"   #'h/history-forget-file
   "<mouse-2>" #'h/history-find-at-point
   "<follow-link>" 'mouse-face)
 
@@ -331,6 +332,15 @@ buffer."
     ('nil (h/user-error "File does not exist!"))
     ('unknown (h/user-error "File not known to exist!"))))
 
+(declare-function h/forget-file "hyperdrive")
+(defun h/history-forget-file (entry)
+  "Delete local copy of the file contents of ENTRY at point.
+Only delete the blob(s) for the file at ENTRY's version range;
+other blobs are not cleared.  Hyperdrive directory contents are
+not modified; file blobs may be recoverable from other peers."
+  (interactive (list (h/history-entry-at-point)) h/history-mode)
+  (h/forget-file entry))
+
 (provide 'hyperdrive-history)
 
 ;; Local Variables:

Reply via email to