branch: elpa/git-commit commit efb09e8d57818894b29d87eecfb09cdab2342b4a Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-renamed-files: Minor tweaks - Assign names to components of each partition. - Use "diff --name-status" instead of "diff-tree -r" because that prints less status information, all of which is discarded. anyway. Cannot use "--name-only" because then only one of the names is printed. - Don't use "-M" ("--find-renames") because that just doubles down on the default, which cannot be overwritten using configuration anyway. - Use `seq-partition' instead of `-partition', and `mapcar' (along with `pcase-lambda') instead of `--map'. --- lisp/magit-git.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index bd1fee84d3..5cb4b5e02c 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1102,10 +1102,11 @@ range. Otherwise, it can be any revision or range accepted by (magit-git-items "diff" "-z" "--name-only" rev-or-range other-rev))) (defun magit-renamed-files (revA revB) - (--map (cons (nth 1 it) (nth 2 it)) - (-partition 3 (magit-git-items - "diff-tree" "-r" "--diff-filter=R" "-z" "-M" - revA revB)))) + (mapcar (pcase-lambda (`(,_status ,fileA ,fileB)) + (cons fileA fileB)) + (seq-partition (magit-git-items "diff" "-z" "--name-status" + "--diff-filter=R" revA revB) + 3))) (defun magit-file-status (&rest args) (magit--with-temp-process-buffer