[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit efb09e8d57 1/9: magit-renamed-files: Minor twea
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit efb09e8d57 1/9: magit-renamed-files: Minor tweaks |
Date: |
Mon, 16 May 2022 16:58:16 -0400 (EDT) |
branch: elpa/git-commit
commit efb09e8d57818894b29d87eecfb09cdab2342b4a
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@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
- [nongnu] elpa/git-commit updated (421105ef4f -> 5a7519fd3d), ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit 1e2b473f20 3/9: magit-ediff-resolve: Rename to magit-ediff-resolve-rest, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit d035386e96 6/9: magit-ediff-buffers: Support merge jobs, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit 5a7519fd3d 9/9: magit-ediff-dwim-resolve-function: New option, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit ce45c43f9d 2/9: magit-ediff-resolve: Move definition, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit efb09e8d57 1/9: magit-renamed-files: Minor tweaks,
ELPA Syncer <=
- [nongnu] elpa/git-commit db2e9546f8 5/9: magit-ediff-buffers: Change argument order, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit 46685b1c76 7/9: magit-ediff-resolve-all: New command, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit 6fc4bacdee 8/9: magit-ediff-resolve-{all, rest}: Use file at point, ELPA Syncer, 2022/05/16
- [nongnu] elpa/git-commit e2e90f7b0c 4/9: magit-ediff-buffers: Cosmetics and new comments, ELPA Syncer, 2022/05/16