emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit d899f0e7a6: Specify :test when calling cl-set-d


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit d899f0e7a6: Specify :test when calling cl-set-difference with strings
Date: Sun, 16 Jan 2022 14:58:05 -0500 (EST)

branch: elpa/git-commit
commit d899f0e7a654182a9ef1e839990194344bc8bbdb
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    Specify :test when calling cl-set-difference with strings
    
    A handful of spots call cl-set-difference with two lists of strings
    but leave :test at its default value of eql.  As a result, the return
    value includes all the items from the first list regardless of which
    items are in the second.
---
 lisp/magit-gitignore.el | 6 ++++--
 lisp/magit-submodule.el | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/magit-gitignore.el b/lisp/magit-gitignore.el
index 634c9e289f..7ff6469591 100644
--- a/lisp/magit-gitignore.el
+++ b/lisp/magit-gitignore.el
@@ -153,7 +153,8 @@ Rules that are defined in that file affect all local 
repositories."
                                  (magit-with-toplevel
                                    (cl-set-difference
                                     (magit-list-files)
-                                    (magit-skip-worktree-files))))))
+                                    (magit-skip-worktree-files)
+                                    :test #'equal)))))
   (magit-with-toplevel
     (magit-run-git "update-index" "--skip-worktree" "--" file)))
 
@@ -177,7 +178,8 @@ Rules that are defined in that file affect all local 
repositories."
                                  (magit-with-toplevel
                                    (cl-set-difference
                                     (magit-list-files)
-                                    (magit-assume-unchanged-files))))))
+                                    (magit-assume-unchanged-files)
+                                    :test #'equal)))))
   (magit-with-toplevel
     (magit-run-git "update-index" "--assume-unchanged" "--" file)))
 
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index b14266197d..a6d98231f9 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -383,14 +383,14 @@ to recover from making a mistake here, but don't count on 
it."
                                           (expand-file-name module))))
                   (magit-git "stash" "push"
                              "-m" "backup before removal of this module")))
-            (setq modules (cl-set-difference modules modified)))
+            (setq modules (cl-set-difference modules modified :test #'equal)))
         (if (cdr modified)
             (message "Omitting %s modules with uncommitted changes: %s"
                      (length modified)
                      (mapconcat #'identity modified ", "))
           (message "Omitting module %s, it has uncommitted changes"
                    (car modified)))
-        (setq modules (cl-set-difference modules modified))))
+        (setq modules (cl-set-difference modules modified :test #'equal))))
     (when modules
       (let ((alist
              (and trash-gitdirs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]