branch: elpa/magit commit 49c096722d1bef1d2ed998bb81e83d45f7cae43e Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-insert-untracked-files: Improve docs Fix a typo in doc-string and copy additional information from doc-string to manual. --- docs/magit.org | 4 ++++ lisp/magit-status.el | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/magit.org b/docs/magit.org index 30dc52fdef0..4790f564c81 100644 --- a/docs/magit.org +++ b/docs/magit.org @@ -2244,6 +2244,10 @@ By default the following functions are also members of that hook: directories. But the directory sections can then be expanded using ~TAB~. + If the first element of ~magit-buffer-diff-files~ is a directory, then + limit the list to files below that. The value of that variable can + be set using ~D -- DIRECTORY RET g~. + - Function: magit-insert-unstaged-changes :: Insert section showing unstaged changes. diff --git a/lisp/magit-status.el b/lisp/magit-status.el index 6b7b475f448..9881d70d882 100644 --- a/lisp/magit-status.el +++ b/lisp/magit-status.el @@ -708,14 +708,14 @@ remote in alphabetic order." (defun magit-insert-untracked-files () "Maybe insert a list or tree of untracked files. -Do so depending on the value of `status.showUntrackedFiles'. -Note that even if the value is `all', Magit still initially -only shows directories. But the directory sections can then -be expanded using \"TAB\". - -If the first element of `magit-buffer-diff-files' is a -directory, then limit the list to files below that. The value -value of that variable can be set using \"D -- DIRECTORY RET g\"." +Do so depending on the value of `status.showUntrackedFiles'. Note +that even if the value is `all', Magit still initially only shows +directories. But the directory sections can then be expanded using +\"TAB\". + +If the first element of `magit-buffer-diff-files' is a directory, then +limit the list to files below that. The value of that variable can be +set using \"D -- DIRECTORY RET g\"." (let ((show (or (magit-get "status.showUntrackedFiles") "normal"))) (unless (equal show "no") (let* ((all (equal show "all"))