{"thread":{"id":"13385","subject":"request - trailing # comments are silently non-functional in .gitignore","startedAt":"2008-05-05T13:36:24Z","lastAt":"2008-05-05T13:36:24Z","messageCount":1,"participants":["Jim Cromie"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"76122","messageId":"481F0D58.50204@gmail.com","threadId":"13385","inReplyTo":null,"subject":"request - trailing # comments are silently non-functional in .gitignore","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2008-05-05T13:36:24Z","receivedAt":"2008-05-05T13:36:24Z","isPatch":false,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"\nperl is starting to use git, so Im a new user.\n\nI wrote a script to generate .gitignore from a MANIFEST,\nso I used a universal ignore, followed by explicit *attends*\n\n# ignore everything\n*\n# watch these files\n!perl.h\n...\n\nwhile testing this, I discovered that trailing comments silently\ninvalidate the rule, so this line is ineffective:\n\n*  # ignore everything. We attend to MANIFEST entries next...\n\n\n\nExplicit MANIFEST support / file inclusion\n\n    !<MANIFEST\n\nthe above could mean dont-ignore all files named in MANIFEST (1st field: \n/^(\\S+)/)\n\n\nThis describes use of other .gitignores (but Im not suggesting this be \nsupported)\n\n    <`find . -name .gitignore`\n\nHowever, this might be useful\n\n    !<`cut -d\\  -f2 MANIFEST-odd`\n\nId accept that this might be too much shell-ish magic for your tastes,\n\n\n\nPreprocessor Support\n\nPerl uses XS to interface to C libs etc, and needs to process foo.xs -> \nfoo.c\nwhich is then compiled to make foo.o.  Heres an excerpt from a makefile\n\n\n# --- MakeMaker xs_c section:\n\n.xs.c:\n        $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) \n$*.xs > $*.xsc && $(MV) $*.xsc $*.c\n\n\n\n\nIt would be nice if this kind of dependency were usable as an \nignoral-directive,\nignore foo.c if foo.xs exists.\n\nsome alternatives:\n\n:*.c:*.xs:\n    - colons signal different kind of line, and delimit 2 specs\n    - the 2 * must match same literals (perhaps why make dev's left them \nout)\n\n*.c!*.xs\n    - here '!' serves as separator of 2 fields\n    - also suggests attend to the 2nd field (which is arguably desirable)\n       if so, it needs to be attended even if *.c is missing (it is \nuntil built)\n"}]}