Commit b8a9ddca authored by Masahiro Yamada's avatar Masahiro Yamada

.gitignore: update the command to check tracked files being ignored

Recent git versions do not accept the noted command.

  $ git ls-files -i --exclude-standard
  fatal: ls-files -i must be used with either -o or -c

The -c was implied before, but we need to make it explicit since
git commit b338e9f66873 ("ls-files: error out on -i unless -o or -c
are specified").

Also, replace --exclude-standard with --exclude-per-directory=.gitignore
so that everyone will get consistent results.

git-ls-files(1) says:

  --exclude-standard
      Add the standard Git exclusions: .git/info/exclude, .gitignore in
      each directory, and the user's global exclusion file.

We cannot predict what is locally added to .git/info/exclude or the
user's global exclusion file.

We can only manage .gitignore files committed to the repository.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 8f99eb85
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# subdirectories here. Add them in the ".gitignore" file # subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead. # in that subdirectory instead.
# #
# NOTE! Please use 'git ls-files -i --exclude-standard' # NOTE! Please use 'git ls-files -i -c --exclude-per-directory=.gitignore'
# command after changing this file, to see if there are # command after changing this file, to see if there are
# any tracked files which get ignored after the change. # any tracked files which get ignored after the change.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment