branch: elpa/magit
commit 8db6caf0994f2e92bbd24ed67804e3939214e711
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit--untracked-files: New function
This is a potential replacement for `magit-untracked-files', but
actually replacing that requires more work.
---
lisp/magit-git.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index d8d9d835c9..1ce4fc2855 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1132,6 +1132,16 @@ issue."
(and (not all) "--exclude-standard")
"--" files))
+(defun magit--untracked-files (&optional directory all)
+ (magit-with-toplevel
+ (seq-keep (##and (eq (aref % 0) ??)
+ (substring % 3))
+ (magit-git-items "status" "-z" "--porcelain"
+ (if all
+ "--untracked-files=all"
+ "--untracked-files=normal")
+ "--" directory))))
+
(defun magit-list-untracked-files (&optional files)
"Return a list of untracked files.