branch: elpa/hyperdrive commit 783f73c602ac64c98aa0b978f84bba94172b2afa Author: Joseph Turner <jos...@ushin.org> Commit: Joseph Turner <jos...@ushin.org>
Change: Remove unnecessary calls h//fill Now that he/api fills disk usage, these calls to h//fill are not needed. --- hyperdrive-diff.el | 8 ++------ hyperdrive-lib.el | 3 --- hyperdrive.el | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el index f804b66dca..3f633da749 100644 --- a/hyperdrive-diff.el +++ b/hyperdrive-diff.el @@ -104,13 +104,9 @@ This function is intended to diff files, not directories." (when (buffer-live-p new-buffer) (kill-buffer new-buffer)))))))) (he/api 'get old-entry :queue queue :else #'ignore - :then (lambda (response) - (h//fill old-entry (plz-response-headers response)) - (setf old-response response))) + :then (lambda (response) (setf old-response response))) (he/api 'get new-entry :queue queue :else #'ignore - :then (lambda (response) - (h//fill new-entry (plz-response-headers response)) - (setf new-response response))))) + :then (lambda (response) (setf new-response response))))) ;;;; Mode diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 2a28d0c482..dcc20c6fcb 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -1005,7 +1005,6 @@ HYPERDRIVE's public metadata file." (pcase-let (((cl-struct plz-response headers body) (he/api 'get entry :noquery t))) - (h//fill entry headers) (with-temp-buffer (insert body) (goto-char (point-min)) @@ -1396,8 +1395,6 @@ If then, then call THEN with no arguments. Default handler." ;; TODO: Handle errors ;; TODO: When plz adds :as 'response-with-buffer, use that. (he/api 'get entry :noquery t)) - ;; Filling entry is necessary in order to update hyperdrive disk-usage. - (_ (h//fill entry headers)) ((cl-struct hyperdrive-entry hyperdrive version etc) entry) ((map target) etc)) (with-current-buffer (h//get-buffer-create entry) diff --git a/hyperdrive.el b/hyperdrive.el index c8b66c0a12..3c3d959c0b 100644 --- a/hyperdrive.el +++ b/hyperdrive.el @@ -201,7 +201,6 @@ modified; file blobs may be recoverable from other peers." :else (lambda (err) (h/error "Unable to clear cache for `%s': %S" (he/url entry) err)) :then (lambda (response) - (h//fill entry (plz-response-headers response)) (h/message "Cleared `%s'" (h//format-entry entry)) ;; TODO: When file sizes in hyperdrive-dir-mode are colorized ;; based locally downloaded sizes, refresh ewoc entry here.