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

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

[elpa] scratch/mheerdegen-preview f11f566 31/32: WIP: Small fix in el-se


From: Michael Heerdegen
Subject: [elpa] scratch/mheerdegen-preview f11f566 31/32: WIP: Small fix in el-search--changed-files-in-repo
Date: Sat, 20 Oct 2018 18:19:03 -0400 (EDT)

branch: scratch/mheerdegen-preview
commit f11f566af71aa023ee54b6e2edde495434e9efcf
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    WIP: Small fix in el-search--changed-files-in-repo
    
    Make semantics analogue to 'el-search--file-changed-p'.
---
 packages/el-search/el-search-x.el | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/packages/el-search/el-search-x.el 
b/packages/el-search/el-search-x.el
index 5b84cb9..e7fa959 100644
--- a/packages/el-search/el-search-x.el
+++ b/packages/el-search/el-search-x.el
@@ -244,14 +244,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 "  [Running Git...]")
-                 (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 "  [Running Git...]")
+      (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]