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

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

[elpa] externals/el-search 3b4b95b 304/332: [el-search] Small fix in el-


From: Stefan Monnier
Subject: [elpa] externals/el-search 3b4b95b 304/332: [el-search] Small fix in el-search--changed-files-in-repo
Date: Tue, 1 Dec 2020 15:49:09 -0500 (EST)

branch: externals/el-search
commit 3b4b95ba3fe03e238a0b7ad73208cdec22248f34
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    [el-search] Small fix in el-search--changed-files-in-repo
    
    * packages/el-search/el-search-x.el
    (el-search--changed-files-in-repo): Try to make semantics analogue to
    that of 'el-search--file-changed-p'.
---
 el-search-x.el | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/el-search-x.el b/el-search-x.el
index 2b6791f..5a4b755 100644
--- a/el-search-x.el
+++ b/el-search-x.el
@@ -226,14 +226,22 @@ The default value is nil."
   "Return a list of files that changed relative to COMMIT.
 COMMIT defaults to HEAD."
   (cl-callf or commit "HEAD")
-  (let ((default-directory repo-root-dir))
-    (mapcar #'expand-file-name
-            (split-string
-             (let ((current-message (current-message)))
-               (with-temp-message (concat current-message "  [Calling VCS...]")
-                 (shell-command-to-string
-                  (format "git diff -z --name-only %s --" 
(shell-quote-argument commit)))))
-             "\0" t))))
+  (let ((default-directory repo-root-dir)
+        (message-log-max nil)
+        (current-message (current-message)))
+    (with-temp-message (concat current-message "  [Calling VCS...]")
+      (mapcar #'expand-file-name
+              (cl-nintersection
+               (split-string
+                (shell-command-to-string
+                 (format "git diff -z --name-only %s --" (shell-quote-argument 
commit)))
+                "\0" t)
+               (split-string
+                (shell-command-to-string
+                 (format "git diff -z --name-only 
4b825dc642cb6eb9a060e54bf8d69288fbee4904 %s --"
+                         (shell-quote-argument commit)))
+                "\0" t)
+               :test #'equal)))))
 
 (defvar vc-git-diff-switches)
 (defun el-search--file-changed-p (file revision)



reply via email to

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