Variable: magit-status-show-untracked-files
magit-status-show-untracked-files is a customizable variable defined
in magit-status.el.
Value
t
Documentation
Whether to list untracked files in the status buffer.
- If nil, do not list any untracked files.
- If t, list untracked files, but if a directory does not contain any
tracked files, then only list that directory, not the contained
untracked files.
- If all, then list each individual untracked files. This is can be
very slow and is discouraged.
The corresponding values for the Git variable are "no", "normal" and "all".
To disable listing untracked files in a specific repository only, add the following to ".dir-locals.el":
((magit-status-mode
(magit-status-show-untracked-files . "no")))
Alternatively (and mostly for historic reasons), it is possible to use
git-config to set the repository-local value:
git config set --local status.showUntrackedFiles no
This does *not* override the (if any) local value of this Lisp variable, but it does override its global value.
See the last section in the git-status(1) manpage, to speed up the part
of the work Git is responsible for. Turning that list into sections is
also not free, so Magit only lists magit-status-file-list-limit files.
This variable was added, or its default value changed, in magit version 4.3.0.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-status.el
(defcustom magit-status-show-untracked-files t
"Whether to list untracked files in the status buffer.
- If nil, do not list any untracked files.
- If t, list untracked files, but if a directory does not contain any
tracked files, then only list that directory, not the contained
untracked files.
- If all, then list each individual untracked files. This is can be
very slow and is discouraged.
The corresponding values for the Git variable are \"no\", \"normal\"
and \"all\".
To disable listing untracked files in a specific repository only, add
the following to \".dir-locals.el\":
((magit-status-mode
(magit-status-show-untracked-files . \"no\")))
Alternatively (and mostly for historic reasons), it is possible to use
`git-config' to set the repository-local value:
git config set --local status.showUntrackedFiles no
This does *not* override the (if any) local value of this Lisp variable,
but it does override its global value.
See the last section in the git-status(1) manpage, to speed up the part
of the work Git is responsible for. Turning that list into sections is
also not free, so Magit only lists `magit-status-file-list-limit' files."
:package-version '(magit . "4.3.0")
:group 'magit-status
:type '(choice (const :tag "Do not list untracked files" nil)
(const :tag "List mixture of files and directories" t)
(const :tag "List individual files (slow)" all))
:safe (##memq % '(nil t all)))