Skip to content

Commit 5823eb2

Browse files
committed
git status: document trade-offs in choosing parameters to the -u option
In some repostories users experience that "git status" command takes long time. The command spends some time searching the file system for untracked files. Explain the trade-off struck by the default choice of `normal` to help users make an appropriate choice better, before talking about the configuration variable. Inspired by Torsten Bögershausen. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1599999 commit 5823eb2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Documentation/git-status.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,21 @@ OPTIONS
4343
Show untracked files.
4444
+
4545
The mode parameter is optional (defaults to 'all'), and is used to
46-
specify the handling of untracked files; when -u is not used, the
47-
default is 'normal', i.e. show untracked files and directories.
46+
specify the handling of untracked files.
4847
+
4948
The possible options are:
5049
+
51-
- 'no' - Show no untracked files
52-
- 'normal' - Shows untracked files and directories
50+
- 'no' - Show no untracked files.
51+
- 'normal' - Shows untracked files and directories.
5352
- 'all' - Also shows individual files in untracked directories.
5453
+
54+
When `-u` option is not used, untracked files and directories are
55+
shown (i.e. the same as specifying `normal`), to help you avoid
56+
forgetting to add newly created files. Because it takes extra work
57+
to find untracked files in the filesystem, this mode may take some
58+
time in a large working tree. You can use `no` to have `git status`
59+
return more quickly without showing untracked files.
60+
+
5561
The default can be changed using the status.showUntrackedFiles
5662
configuration variable documented in linkgit:git-config[1].
5763

0 commit comments

Comments
 (0)