Skip to content

Commit bbc8c05

Browse files
committed
Merge branch 'jc/ls-files-doc-update'
The documentation for the --exclude-per-directory option marked it as deprecated, which confused readers into thinking there may be a plan to remove it in the future, which was not our intention. * jc/ls-files-doc-update: ls-files: avoid the verb "deprecate" for individual options
2 parents cbcf619 + 0009542 commit bbc8c05

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Documentation/git-ls-files.txt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ OPTIONS
119119

120120
--exclude-per-directory=<file>::
121121
Read additional exclude patterns that apply only to the
122-
directory and its subdirectories in <file>. Deprecated; use
123-
--exclude-standard instead.
122+
directory and its subdirectories in <file>. If you are
123+
trying to emulate the way Porcelain commands work, using
124+
the `--exclude-standard` option instead is easier and more
125+
thorough.
124126

125127
--exclude-standard::
126128
Add the standard Git exclusions: .git/info/exclude, .gitignore
@@ -298,9 +300,8 @@ traversing the directory tree and finding files to show when the
298300
flags --others or --ignored are specified. linkgit:gitignore[5]
299301
specifies the format of exclude patterns.
300302

301-
Generally, you should just use --exclude-standard, but for historical
302-
reasons the exclude patterns can be specified from the following
303-
places, in order:
303+
These exclude patterns can be specified from the following places,
304+
in order:
304305

305306
1. The command-line flag --exclude=<pattern> specifies a
306307
single pattern. Patterns are ordered in the same order
@@ -322,6 +323,18 @@ top of the directory tree. A pattern read from a file specified
322323
by --exclude-per-directory is relative to the directory that the
323324
pattern file appears in.
324325

326+
Generally, you should be able to use `--exclude-standard` when you
327+
want the exclude rules applied the same way as what Porcelain
328+
commands do. To emulate what `--exclude-standard` specifies, you
329+
can give `--exclude-per-directory=.gitignore`, and then specify:
330+
331+
1. The file specified by the `core.excludesfile` configuration
332+
variable, if exists, or the `$XDG_CONFIG_HOME/git/ignore` file.
333+
334+
2. The `$GIT_DIR/info/exclude` file.
335+
336+
via the `--exclude-from=` option.
337+
325338
SEE ALSO
326339
--------
327340
linkgit:git-read-tree[1], linkgit:gitignore[5]

0 commit comments

Comments
 (0)