[PATCH 2/2] Use rooted paths in .gitignore files
Vladimir Panteleev
notmuch at thecybershadow.net
Wed Aug 16 17:41:10 PDT 2017
A leading / in paths in a .gitignore file matches the beginning of the
path, meaning that for patterns without slashes, git will match files
only in the current directory as opposed to in any subdirectory.
Prefix relevant paths with / in .gitignore files, to prevent
accidentally ignoring files in subdirectories and possibly slightly
improve the performance of "git status".
---
.gitignore | 18 +++++++++---------
bindings/python/.gitignore | 2 +-
bindings/ruby/.gitignore | 6 +++---
compat/.gitignore | 2 +-
contrib/go/.gitignore | 6 +++---
contrib/notmuch-mutt/.gitignore | 4 ++--
debian/.gitignore | 28 ++++++++++++++--------------
devel/nmbug/doc/.gitignore | 2 +-
doc/.gitignore | 4 ++--
emacs/.gitignore | 8 ++++----
performance-test/.gitignore | 8 ++++----
performance-test/download/.gitignore | 4 ++--
test/.gitignore | 22 +++++++++++-----------
test/test-databases/.gitignore | 2 +-
14 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7b283fb3..0ccd217e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,16 +1,16 @@
-.first-build-message
-Makefile.config
-sh.config
-version.stamp
+/.first-build-message
+/Makefile.config
+/sh.config
+/version.stamp
TAGS
tags
*cscope*
-.deps
+/.deps
/notmuch
-notmuch-shared
-libnotmuch.so*
-libnotmuch*.dylib
+/notmuch-shared
+/lib/libnotmuch.so*
+/lib/libnotmuch*.dylib
*.[ao]
*~
.*.swp
-releases
+/releases
diff --git a/bindings/python/.gitignore b/bindings/python/.gitignore
index da0732e9..601acdd7 100644
--- a/bindings/python/.gitignore
+++ b/bindings/python/.gitignore
@@ -1,4 +1,4 @@
*.py[co]
/docs/build
/docs/html
-build/
+/build/
diff --git a/bindings/ruby/.gitignore b/bindings/ruby/.gitignore
index d682798a..c57ae63f 100644
--- a/bindings/ruby/.gitignore
+++ b/bindings/ruby/.gitignore
@@ -1,7 +1,7 @@
# .gitignore for bindings/ruby
# Generated files
-Makefile
-mkmf.log
-notmuch.so
+/Makefile
+/mkmf.log
+/notmuch.so
*.o
diff --git a/compat/.gitignore b/compat/.gitignore
index 107ba17a..7ede45e9 100644
--- a/compat/.gitignore
+++ b/compat/.gitignore
@@ -1 +1 @@
-zlib.pc
+/zlib.pc
diff --git a/contrib/go/.gitignore b/contrib/go/.gitignore
index c394479f..223504b1 100644
--- a/contrib/go/.gitignore
+++ b/contrib/go/.gitignore
@@ -1,3 +1,3 @@
-src/github.com/
-pkg/
-bin/
+/src/github.com/
+/pkg/
+/bin/
diff --git a/contrib/notmuch-mutt/.gitignore b/contrib/notmuch-mutt/.gitignore
index 682a5779..116bb715 100644
--- a/contrib/notmuch-mutt/.gitignore
+++ b/contrib/notmuch-mutt/.gitignore
@@ -1,2 +1,2 @@
-notmuch-mutt.1
-README.html
+/notmuch-mutt.1
+/README.html
diff --git a/debian/.gitignore b/debian/.gitignore
index e8c2e82a..ab384182 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -1,14 +1,14 @@
-tmp/
-libnotmuch-dev/
-libnotmuch*/
-notmuch-emacs/
-notmuch/
-notmuch-dbg/
-notmuch-mutt/
-notmuch-vim/
-ruby-notmuch/
-python*-notmuch/
-*.debhelper
-*.debhelper.log
-*.substvars
-files
+/tmp/
+/libnotmuch-dev/
+/libnotmuch*/
+/notmuch-emacs/
+/notmuch/
+/notmuch-dbg/
+/notmuch-mutt/
+/notmuch-vim/
+/ruby-notmuch/
+/python*-notmuch/
+/*.debhelper
+/*.debhelper.log
+/*.substvars
+/files
diff --git a/devel/nmbug/doc/.gitignore b/devel/nmbug/doc/.gitignore
index 4930881a..f25d695c 100644
--- a/devel/nmbug/doc/.gitignore
+++ b/devel/nmbug/doc/.gitignore
@@ -1,2 +1,2 @@
*.pyc
-_build
+/_build
diff --git a/doc/.gitignore b/doc/.gitignore
index 9fa35d08..bbb749fa 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,3 +1,3 @@
*.pyc
-_build
-config.dox
+/_build
+/config.dox
diff --git a/emacs/.gitignore b/emacs/.gitignore
index 8e15eed7..fbf8dde6 100644
--- a/emacs/.gitignore
+++ b/emacs/.gitignore
@@ -1,4 +1,4 @@
-.eldeps*
-*.elc
-notmuch-version.el
-notmuch-pkg.el
+/.eldeps*
+/*.elc
+/notmuch-version.el
+/notmuch-pkg.el
diff --git a/performance-test/.gitignore b/performance-test/.gitignore
index f3f9be41..8a5dabf5 100644
--- a/performance-test/.gitignore
+++ b/performance-test/.gitignore
@@ -1,4 +1,4 @@
-tmp.*/
-log.*/
-corpus/
-notmuch.cache.*/
+/tmp.*/
+/log.*/
+/corpus/
+/notmuch.cache.*/
diff --git a/performance-test/download/.gitignore b/performance-test/download/.gitignore
index 7b092346..5c356204 100644
--- a/performance-test/download/.gitignore
+++ b/performance-test/download/.gitignore
@@ -1,2 +1,2 @@
-*.tar.gz
-*.tar.xz
+/*.tar.gz
+/*.tar.xz
diff --git a/test/.gitignore b/test/.gitignore
index 226019ed..73fe7e24 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,11 +1,11 @@
-arg-test
-corpora.mail
-hex-xcode
-parse-time
-random-corpus
-smtp-dummy
-symbol-test
-make-db-version
-test-results
-ghost-report
-tmp.*
+/arg-test
+/corpora.mail
+/hex-xcode
+/parse-time
+/random-corpus
+/smtp-dummy
+/symbol-test
+/make-db-version
+/test-results
+/ghost-report
+/tmp.*
diff --git a/test/test-databases/.gitignore b/test/test-databases/.gitignore
index b5624b74..9452199f 100644
--- a/test/test-databases/.gitignore
+++ b/test/test-databases/.gitignore
@@ -1 +1 @@
-*.tar.xz
+/*.tar.xz
--
2.13.3
More information about the notmuch
mailing list