All the entries in these four directories name files generated at the top level of the directory, but none of them is anchored, so they also match any file with the same name in a subdirectory.
The bash completion files are named after the programs they complete and live in <dir>/completion/bash/, so each of them is currently matched by the entry for its own generated program. Adding a new completion file needs git add -f, and git add -A skips it silently. Anchor every entry with a leading "/" so that it only matches the generated file it is meant to match. Ref: #1061450 --- dselect/.gitignore | 6 +++--- scripts/.gitignore | 48 +++++++++++++++++++++++----------------------- src/.gitignore | 24 +++++++++++------------ utils/.gitignore | 8 ++++---- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/dselect/.gitignore b/dselect/.gitignore index bba6d3455..20629e6cf 100644 --- a/dselect/.gitignore +++ b/dselect/.gitignore @@ -1,3 +1,3 @@ -curkeys.h -curkeys.hpp -dselect +/curkeys.h +/curkeys.hpp +/dselect diff --git a/scripts/.gitignore b/scripts/.gitignore index 8bbf4e05b..17c8d7d89 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,24 +1,24 @@ -Build.PL -README.cpan -dpkg-architecture -dpkg-buildapi -dpkg-buildflags -dpkg-buildpackage -dpkg-buildtree -dpkg-checkbuilddeps -dpkg-distaddfile -dpkg-genbuildinfo -dpkg-genchanges -dpkg-gencontrol -dpkg-gensymbols -dpkg-mergechangelogs -dpkg-name -dpkg-parsechangelog -dpkg-scanpackages -dpkg-scansources -dpkg-shlibdeps -dpkg-source -dpkg-statoverride -dpkg-vendor -t.tmp -cover_db +/Build.PL +/README.cpan +/dpkg-architecture +/dpkg-buildapi +/dpkg-buildflags +/dpkg-buildpackage +/dpkg-buildtree +/dpkg-checkbuilddeps +/dpkg-distaddfile +/dpkg-genbuildinfo +/dpkg-genchanges +/dpkg-gencontrol +/dpkg-gensymbols +/dpkg-mergechangelogs +/dpkg-name +/dpkg-parsechangelog +/dpkg-scanpackages +/dpkg-scansources +/dpkg-shlibdeps +/dpkg-source +/dpkg-statoverride +/dpkg-vendor +/t.tmp +/cover_db diff --git a/src/.gitignore b/src/.gitignore index 3a122bf11..13279a60d 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,12 +1,12 @@ -dpkg -dpkg-db-backup -dpkg-db-keeper -dpkg-deb -dpkg-divert -dpkg-maintscript-helper -dpkg-query -dpkg-realpath -dpkg-split -dpkg-statoverride -dpkg-trigger -t.tmp +/dpkg +/dpkg-db-backup +/dpkg-db-keeper +/dpkg-deb +/dpkg-divert +/dpkg-maintscript-helper +/dpkg-query +/dpkg-realpath +/dpkg-split +/dpkg-statoverride +/dpkg-trigger +/t.tmp diff --git a/utils/.gitignore b/utils/.gitignore index edc11e367..005b37350 100644 --- a/utils/.gitignore +++ b/utils/.gitignore @@ -1,4 +1,4 @@ -org.dpkg.pkexec.update-alternatives.policy -start-stop-daemon -update-alternatives -t.tmp +/org.dpkg.pkexec.update-alternatives.policy +/start-stop-daemon +/update-alternatives +/t.tmp -- 2.47.3

