Skip to contentSkip to conversation

.gitignore: prefix local generated files with a slash

PATCH In review Masahiro Yamada 3 participants 3 messages Apr 30, 2021

Subsystems (17)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 .gitignore: prefix local generated files with a slash

The pattern prefixed with '/' matches files in the same directory, but not ones in sub-directories.

---

Changes in v2:
- rebase

 Documentation/devicetree/bindings/.gitignore |  4 ++--
 arch/.gitignore                              |  4 ++--
 certs/.gitignore                             |  4 ++--
 drivers/memory/.gitignore                    |  2 +-
 drivers/tty/vt/.gitignore                    |  6 +++---
 fs/unicode/.gitignore                        |  4 ++--
 kernel/.gitignore                            |  2 +-
 lib/.gitignore                               | 10 +++++-----
 samples/auxdisplay/.gitignore                |  2 +-
 samples/binderfs/.gitignore                  |  3 ++-
 samples/connector/.gitignore                 |  2 +-
 samples/hidraw/.gitignore                    |  2 +-
 samples/mei/.gitignore                       |  2 +-
 samples/nitro_enclaves/.gitignore            |  2 +-
 samples/pidfd/.gitignore                     |  2 +-
 samples/seccomp/.gitignore                   |  8 ++++----
 samples/timers/.gitignore                    |  2 +-
 samples/vfs/.gitignore                       |  4 ++--
 samples/watch_queue/.gitignore               |  3 ++-
 samples/watchdog/.gitignore                  |  2 +-
 scripts/.gitignore                           | 18 +++++++++---------
 scripts/basic/.gitignore                     |  2 +-
 scripts/dtc/.gitignore                       |  4 ++--
 scripts/gcc-plugins/.gitignore               |  2 +-
 scripts/genksyms/.gitignore                  |  2 +-
 scripts/mod/.gitignore                       |  8 ++++----
 usr/.gitignore                               |  4 ++--
 27 files changed, 56 insertions(+), 54 deletions(-)
Documentation/devicetree/bindings/.gitignore +2 -2
index 3a05b99bfa26..a77719968a7e 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 *.example.dts
-processed-schema*.yaml
-processed-schema*.json
+/processed-schema*.yaml
+/processed-schema*.json
arch/.gitignore +2 -2
index 4191da401dbb..756c19c34f99 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-i386
-x86_64
+/i386/
+/x86_64/
certs/.gitignore +2 -2
index 6cbd1f1a5837..8c3763f80be3 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-x509_certificate_list
-x509_revocation_list
+/x509_certificate_list
+/x509_revocation_list
drivers/memory/.gitignore +1 -1
index caedc4c7d2db..5e84bee05ef8 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-ti-emif-asm-offsets.h
+/ti-emif-asm-offsets.h
drivers/tty/vt/.gitignore +3 -3
index 3ecf42234d89..0221709b177d 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-conmakehash
-consolemap_deftbl.c
-defkeymap.c
+/conmakehash
+/consolemap_deftbl.c
+/defkeymap.c
fs/unicode/.gitignore +2 -2
index 9b2467e77b2d..361294571ab0 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-mkutf8data
-utf8data.h
+/mkutf8data
+/utf8data.h
kernel/.gitignore +1 -1
index 4abc4e033ed8..4dc1ffe9770b 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-kheaders.md5
+/kheaders.md5
lib/.gitignore +5 -5
index 327cb2c7f2c9..5e7fa54c4536 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
-gen_crc32table
-gen_crc64table
-crc32table.h
-crc64table.h
-oid_registry_data.c
+/crc32table.h
+/crc64table.h
+/gen_crc32table
+/gen_crc64table
+/oid_registry_data.c
samples/auxdisplay/.gitignore +1 -1
index 2ed744c0e741..d023816849bd 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-cfag12864b-example
+/cfag12864b-example
samples/binderfs/.gitignore +2 -1
index eb60241e8087..8fa415a3640b 100644
@@ -1 +1,2 @@
-binderfs_example
+# SPDX-License-Identifier: GPL-2.0
+/binderfs_example
samples/connector/.gitignore +1 -1
index d86f2ff9c947..0e26039f39b5 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-ucon
+/ucon
samples/hidraw/.gitignore +1 -1
index d7a6074ebcf9..5233ab63262e 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-hid-example
+/hid-example
samples/mei/.gitignore +1 -1
index db5e802f041e..fe894bcb6a62 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-mei-amt-version
+/mei-amt-version
samples/nitro_enclaves/.gitignore +1 -1
index 827934129c90..6a718eec71f4 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-ne_ioctl_sample
+/ne_ioctl_sample
samples/pidfd/.gitignore +1 -1
index eea857fca736..d4cfa3176b1b 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-pidfd-metadata
+/pidfd-metadata
samples/seccomp/.gitignore +4 -4
index 4a5a5b7db30b..a6df0da77c5d 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
-bpf-direct
-bpf-fancy
-dropper
-user-trap
+/bpf-direct
+/bpf-fancy
+/dropper
+/user-trap
samples/timers/.gitignore +1 -1
index 40510c33cf08..cd9ff7b95383 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-hpet_example
+/hpet_example
samples/vfs/.gitignore +2 -2
index 8fdabf7e5373..79212d91285b 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-test-fsmount
-test-statx
+/test-fsmount
+/test-statx
samples/watch_queue/.gitignore +2 -1
index 2aa3c7e56a1a..823b351d3db9 100644
@@ -1 +1,2 @@
-watch_test
+# SPDX-License-Identifier: GPL-2.0-only
+/watch_test
samples/watchdog/.gitignore +1 -1
index 74153b831244..a70a0150ed9f 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-watchdog-simple
+/watchdog-simple
scripts/.gitignore +9 -9
index a6c11316c969..e83c620ef52c 100644
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
-bin2c
-kallsyms
-unifdef
-recordmcount
-sorttable
-asn1_compiler
-extract-cert
-sign-file
-insert-sys-cert
+/asn1_compiler
+/bin2c
+/extract-cert
+/insert-sys-cert
+/kallsyms
 /module.lds
+/recordmcount
+/sign-file
+/sorttable
+/unifdef
scripts/basic/.gitignore +1 -1
index 98ae1f509592..961c91c8a884 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-fixdep
+/fixdep
scripts/dtc/.gitignore +2 -2
index 8a8b62bf3d3c..e0b5c1d2464a 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtc
-fdtoverlay
+/dtc
+/fdtoverlay
scripts/gcc-plugins/.gitignore +1 -1
index b04e0f0f033e..5cc385b9eb97 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-randomize_layout_seed.h
+/randomize_layout_seed.h
scripts/genksyms/.gitignore +1 -1
index 999af710f83d..0b275abf9405 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-genksyms
+/genksyms
scripts/mod/.gitignore +4 -4
index 07e4a39f90a6..ed2e13b708ce 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
-elfconfig.h
-mk_elfconfig
-modpost
-devicetable-offsets.h
+/elfconfig.h
+/mk_elfconfig
+/modpost
+/devicetable-offsets.h
usr/.gitignore +2 -2
index 935442ed1eb2..8996e7a88902 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-gen_init_cpio
-initramfs_data.cpio
+/gen_init_cpio
+/initramfs_data.cpio
 /initramfs_inc_data
Signature · 1 line
2.27.0
Acked-by on v2 1/1
#2 lore raw
In reply to Masahiro Yamada
Quoted 7 lines · Masahiro Yamada

The pattern prefixed with '/' matches files in the same directory, but not ones in sub-directories.

Quoted 307 lines

---

Changes in v2:
- rebase

 Documentation/devicetree/bindings/.gitignore |  4 ++--
 arch/.gitignore                              |  4 ++--
 certs/.gitignore                             |  4 ++--
 drivers/memory/.gitignore                    |  2 +-
 drivers/tty/vt/.gitignore                    |  6 +++---
 fs/unicode/.gitignore                        |  4 ++--
 kernel/.gitignore                            |  2 +-
 lib/.gitignore                               | 10 +++++-----
 samples/auxdisplay/.gitignore                |  2 +-
 samples/binderfs/.gitignore                  |  3 ++-
 samples/connector/.gitignore                 |  2 +-
 samples/hidraw/.gitignore                    |  2 +-
 samples/mei/.gitignore                       |  2 +-
 samples/nitro_enclaves/.gitignore            |  2 +-
 samples/pidfd/.gitignore                     |  2 +-
 samples/seccomp/.gitignore                   |  8 ++++----
 samples/timers/.gitignore                    |  2 +-
 samples/vfs/.gitignore                       |  4 ++--
 samples/watch_queue/.gitignore               |  3 ++-
 samples/watchdog/.gitignore                  |  2 +-
 scripts/.gitignore                           | 18 +++++++++---------
 scripts/basic/.gitignore                     |  2 +-
 scripts/dtc/.gitignore                       |  4 ++--
 scripts/gcc-plugins/.gitignore               |  2 +-
 scripts/genksyms/.gitignore                  |  2 +-
 scripts/mod/.gitignore                       |  8 ++++----
 usr/.gitignore                               |  4 ++--
 27 files changed, 56 insertions(+), 54 deletions(-)
Documentation/devicetree/bindings/.gitignore +2 -2
index 3a05b99bfa26..a77719968a7e 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 *.example.dts
-processed-schema*.yaml
-processed-schema*.json
+/processed-schema*.yaml
+/processed-schema*.json
arch/.gitignore +2 -2
index 4191da401dbb..756c19c34f99 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-i386
-x86_64
+/i386/
+/x86_64/
certs/.gitignore +2 -2
index 6cbd1f1a5837..8c3763f80be3 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-x509_certificate_list
-x509_revocation_list
+/x509_certificate_list
+/x509_revocation_list
drivers/memory/.gitignore +1 -1
index caedc4c7d2db..5e84bee05ef8 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-ti-emif-asm-offsets.h
+/ti-emif-asm-offsets.h
drivers/tty/vt/.gitignore +3 -3
index 3ecf42234d89..0221709b177d 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-conmakehash
-consolemap_deftbl.c
-defkeymap.c
+/conmakehash
+/consolemap_deftbl.c
+/defkeymap.c
fs/unicode/.gitignore +2 -2
index 9b2467e77b2d..361294571ab0 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-mkutf8data
-utf8data.h
+/mkutf8data
+/utf8data.h
kernel/.gitignore +1 -1
index 4abc4e033ed8..4dc1ffe9770b 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-kheaders.md5
+/kheaders.md5
lib/.gitignore +5 -5
index 327cb2c7f2c9..5e7fa54c4536 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
-gen_crc32table
-gen_crc64table
-crc32table.h
-crc64table.h
-oid_registry_data.c
+/crc32table.h
+/crc64table.h
+/gen_crc32table
+/gen_crc64table
+/oid_registry_data.c
samples/auxdisplay/.gitignore +1 -1
index 2ed744c0e741..d023816849bd 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-cfag12864b-example
+/cfag12864b-example
samples/binderfs/.gitignore +2 -1
index eb60241e8087..8fa415a3640b 100644
@@ -1 +1,2 @@
-binderfs_example
+# SPDX-License-Identifier: GPL-2.0
+/binderfs_example
samples/connector/.gitignore +1 -1
index d86f2ff9c947..0e26039f39b5 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-ucon
+/ucon
samples/hidraw/.gitignore +1 -1
index d7a6074ebcf9..5233ab63262e 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-hid-example
+/hid-example
samples/mei/.gitignore +1 -1
index db5e802f041e..fe894bcb6a62 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-mei-amt-version
+/mei-amt-version
samples/nitro_enclaves/.gitignore +1 -1
index 827934129c90..6a718eec71f4 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-ne_ioctl_sample
+/ne_ioctl_sample
samples/pidfd/.gitignore +1 -1
index eea857fca736..d4cfa3176b1b 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-pidfd-metadata
+/pidfd-metadata
samples/seccomp/.gitignore +4 -4
index 4a5a5b7db30b..a6df0da77c5d 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
-bpf-direct
-bpf-fancy
-dropper
-user-trap
+/bpf-direct
+/bpf-fancy
+/dropper
+/user-trap
samples/timers/.gitignore +1 -1
index 40510c33cf08..cd9ff7b95383 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-hpet_example
+/hpet_example
samples/vfs/.gitignore +2 -2
index 8fdabf7e5373..79212d91285b 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-test-fsmount
-test-statx
+/test-fsmount
+/test-statx
samples/watch_queue/.gitignore +2 -1
index 2aa3c7e56a1a..823b351d3db9 100644
@@ -1 +1,2 @@
-watch_test
+# SPDX-License-Identifier: GPL-2.0-only
+/watch_test
samples/watchdog/.gitignore +1 -1
index 74153b831244..a70a0150ed9f 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-watchdog-simple
+/watchdog-simple
scripts/.gitignore +9 -9
index a6c11316c969..e83c620ef52c 100644
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
-bin2c
-kallsyms
-unifdef
-recordmcount
-sorttable
-asn1_compiler
-extract-cert
-sign-file
-insert-sys-cert
+/asn1_compiler
+/bin2c
+/extract-cert
+/insert-sys-cert
+/kallsyms
 /module.lds
+/recordmcount
+/sign-file
+/sorttable
+/unifdef
scripts/basic/.gitignore +1 -1
index 98ae1f509592..961c91c8a884 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-fixdep
+/fixdep
scripts/dtc/.gitignore +2 -2
index 8a8b62bf3d3c..e0b5c1d2464a 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtc
-fdtoverlay
+/dtc
+/fdtoverlay
scripts/gcc-plugins/.gitignore +1 -1
index b04e0f0f033e..5cc385b9eb97 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-randomize_layout_seed.h
+/randomize_layout_seed.h
scripts/genksyms/.gitignore +1 -1
index 999af710f83d..0b275abf9405 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-genksyms
+/genksyms
scripts/mod/.gitignore +4 -4
index 07e4a39f90a6..ed2e13b708ce 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
-elfconfig.h
-mk_elfconfig
-modpost
-devicetable-offsets.h
+/elfconfig.h
+/mk_elfconfig
+/modpost
+/devicetable-offsets.h
usr/.gitignore +2 -2
index 935442ed1eb2..8996e7a88902 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-gen_init_cpio
-initramfs_data.cpio
+/gen_init_cpio
+/initramfs_data.cpio
 /initramfs_inc_data
Signature · 1 line
Gabriel Krisman Bertazi