From: Jim Cromie Date: Mon, 05 May 2008 13:36:24 GMT Subject: request - trailing # comments are silently non-functional in .gitignore Message-ID: <481F0D58.50204@gmail.com> perl is starting to use git, so Im a new user. I wrote a script to generate .gitignore from a MANIFEST, so I used a universal ignore, followed by explicit *attends* # ignore everything * # watch these files !perl.h ... while testing this, I discovered that trailing comments silently invalidate the rule, so this line is ineffective: * # ignore everything. We attend to MANIFEST entries next... Explicit MANIFEST support / file inclusion ! foo.c which is then compiled to make foo.o. Heres an excerpt from a makefile # --- MakeMaker xs_c section: .xs.c: $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c It would be nice if this kind of dependency were usable as an ignoral-directive, ignore foo.c if foo.xs exists. some alternatives: :*.c:*.xs: - colons signal different kind of line, and delimit 2 specs - the 2 * must match same literals (perhaps why make dev's left them out) *.c!*.xs - here '!' serves as separator of 2 fields - also suggests attend to the 2nd field (which is arguably desirable) if so, it needs to be attended even if *.c is missing (it is until built)