branch: scratch/mheerdegen-preview commit f11f566af71aa023ee54b6e2edde495434e9efcf Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
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)