All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] .gitinogre: update the command to check tracked files being ignored
@ 2022-12-24 15:51 Masahiro Yamada
  2022-12-24 15:51 ` [PATCH v2 2/2] kbuild: make W=1 warn files that are tracked but ignored by git Masahiro Yamada
  2022-12-25 18:37 ` [PATCH v2 1/2] .gitinogre: update the command to check tracked files being ignored Miguel Ojeda
  0 siblings, 2 replies; 7+ messages in thread
From: Masahiro Yamada @ 2022-12-24 15:51 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Alex Gaynor, Andrew Davis,
	Kees Cook, Miguel Ojeda, Wedson Almeida Filho

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 for older git versions, but we need to make it
explicit now.

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 never know what are locally added to $GIT_DIR/info/exclude or
$XDG_CONFIG_HOME/git/ignore.

We can only manage .gitignore files committed in the repository.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

(no changes since v1)

 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 3ec73ead6757..2e2e3d1eeaee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
 # subdirectories here. Add them in the ".gitignore" file
 # 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
 # any tracked files which get ignored after the change.
 #
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-29  7:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-24 15:51 [PATCH v2 1/2] .gitinogre: update the command to check tracked files being ignored Masahiro Yamada
2022-12-24 15:51 ` [PATCH v2 2/2] kbuild: make W=1 warn files that are tracked but ignored by git Masahiro Yamada
2022-12-24 18:17   ` kernel test robot
2022-12-27  3:57   ` Nathan Chancellor
2022-12-28 16:48   ` Nicolas Schier
2022-12-29  7:36     ` Masahiro Yamada
2022-12-25 18:37 ` [PATCH v2 1/2] .gitinogre: update the command to check tracked files being ignored Miguel Ojeda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.