git-ls-files has an argument "--exclude=<pattern>". I have copied the relevant code snippets to do the same for git-add-files. I want this facility so that I can disable processing of .gitignore files for some shell scripts that I've cobbled together to update git repositories from tar files of new versions of software packages. Adding "!*" to .git/info/exclude does not achieve this, because the .gitignore files have priority, and I can see arguments why this should be so, so that .git/info/exclude can just encode defaults and individual directories can have more specific rules. In comparison, passing "--exclude='!*'" apparently does have priority over the .gitignore files. By the way, the particular situation where I had this problem was in linux-2.6.19, which shoots itself in the foot a bit by including .gitignore files that exclude source files like arch/*/kernel/vmlinux.ld.S, include/asm-*/{alternative-asm,frame}.i and the .cvsignore files themselves. However, fixing this linux kernel problem is not the point of this email. I want a facility that can reliably add files from source trees even if they have minor bugs like this in their .gitignore rules. Many thanks to ShadeHawk on the git IRC channel for pointing out to me that the git-find-ls manual page actually describes the problem and a fix for the case of vmlinux.ld.S in the linux kernel tree, and for suggesting --exclude=pattern instead of --exclude-per-directory=filename. Adam Richter - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2.1.8 : 2006-12-03 08:27:42 EST