[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin 8cfdaad790: * elpa-admin.el (elpaa--cleanup-packages):
From: |
Jonas Bernoulli |
Subject: |
[elpa] elpa-admin 8cfdaad790: * elpa-admin.el (elpaa--cleanup-packages): Comment out more effectively |
Date: |
Tue, 6 Jun 2023 17:14:22 -0400 (EDT) |
branch: elpa-admin
commit 8cfdaad790572645feb37773c327eece0bda491c
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
* elpa-admin.el (elpaa--cleanup-packages): Comment out more effectively
The condition that remained after the body was commented out has
no side-effects, and by itself it has no effect either. Thus it
only had costs, including an unhappy byte-compiler.
---
elpa-admin.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index e1e0d2dd1e..968a5d51ee 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1995,7 +1995,7 @@ Return non-nil if there's an \"emacs\" repository
present."
(throw 'found-important-file file)))
nil))
-(defun elpaa--cleanup-packages (specs with-core)
+(defun elpaa--cleanup-packages (specs _with-core)
"Remove unknown subdirectories of `packages/'.
This is any subdirectory inside `packages/' that's not under
version control nor listed in SPECS.
@@ -2026,21 +2026,20 @@ If WITH-CORE is non-nil, it means we manage :core
packages as well."
(progn (delete-directory dir 'recursive t)
(message "Deleted all of %s" dir))
(message "Keeping leftover unclean %s:\n%s" dir status))))
- ;; Check if `dir' is under version control.
- ((and with-core
- (not (zerop (elpaa--call nil "git" "ls-files"
- "--error-unmatch" dir))))
- ;; Not under version control. Check if it only contains
- ;; symlinks and generated files, in which case it is probably
- ;; a leftover :core package that can safely be deleted.
- ;; (let ((file (elpaa--find-non-trivial-file dir)))
- ;; (if file
- ;; (message "Keeping %s for non-trivial file \"%s\"" dir file)
- ;; (progn
- ;; (message "Deleted untracked package %s" dir)
- ;; (delete-directory dir 'recursive t))))
- ))))))
-
+ ;; ;; Check if `dir' is under version control.
+ ;; ((and with-core
+ ;; (not (zerop (elpaa--call nil "git" "ls-files"
+ ;; "--error-unmatch" dir))))
+ ;; ;; Not under version control. Check if it only contains
+ ;; ;; symlinks and generated files, in which case it is probably
+ ;; ;; a leftover :core package that can safely be deleted.
+ ;; (let ((file (elpaa--find-non-trivial-file dir)))
+ ;; (if file
+ ;; (message "Keeping %s for non-trivial file \"%s\"" dir file)
+ ;; (progn
+ ;; (message "Deleted untracked package %s" dir)
+ ;; (delete-directory dir 'recursive t)))))
+ )))))
(defun elpaa--worktree-sync (pkg-spec)
"Sync worktree of PKG-SPEC."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] elpa-admin 8cfdaad790: * elpa-admin.el (elpaa--cleanup-packages): Comment out more effectively,
Jonas Bernoulli <=