* .gitignore: Add rule that requires . in name, then add exemptions.
---
Given Chris' recent accident in committing a binary file, then
blasting the list with it, here's a (hack) approach to prevent a
relapse in the future. It assumes that non-binary files either
have an extension, or are easy enough to enumerate.
Personally, I do NOT want to apply this patch. It has the nasty
side-effect of rendering .git/info/exclude useless (git unfortunately
stops processing ignore rules once it finds an explicit accept rule,
so any reject rules in .git/info/exclude for files containing '.' are
overruled as accepts by this patch). Hence, this is only an RFC,
documenting my thought process.
.gitignore | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index a7466fd..7d2bce3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,41 @@
+# To reduce likelihood of committing binaries, require that a '.' be
+# in all non-directories, then add exceptions as needed.
+*
+!*.*
+!/AUTHORS
+!/ChangeLog-old
+!/HACKING
+!README
+!TODO
+!/bootstrap
+!/examples/apparmor/TEMPLATE
+!/examples/apparmor/libvirt-qemu
+!/tests/capabilityschematest
+!/tests/cpuset
+!/tests/daemon-conf
+!/tests/define-dev-segfault
+!/tests/domainschematest
+!/tests/int-overflow
+!/tests/interfaceschematest
+!/tests/libvirtd-fail
+!/tests/libvirtd-pool
+!/tests/networkschematest
+!/tests/nodedevschematest
+!/tests/nwfilterschematest
+!/tests/qemuhelpdata/kvm-74
+!/tests/qemuhelpdata/kvm-86
+!/tests/read-bufsiz
+!/tests/read-non-seekable
+!/tests/start
+!/tests/storagepoolschematest
+!/tests/storagevolschematest
+!/tests/undefine
+!/tests/vcpupin
+!/tests/virsh-all
+!/tests/virsh-synopsis
+!/tests/virt-aa-helper-test
+
+# Other files to exclude
*#*#
*.#*#
*.a
--
1.6.6.1