git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* request - trailing # comments are silently non-functional in .gitignore
@ 2008-05-05 13:36 Jim Cromie
  0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2008-05-05 13:36 UTC (permalink / raw)
  To: git


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

    !<MANIFEST

the above could mean dont-ignore all files named in MANIFEST (1st field: 
/^(\S+)/)


This describes use of other .gitignores (but Im not suggesting this be 
supported)

    <`find . -name .gitignore`

However, this might be useful

    !<`cut -d\  -f2 MANIFEST-odd`

Id accept that this might be too much shell-ish magic for your tastes,



Preprocessor Support

Perl uses XS to interface to C libs etc, and needs to process foo.xs -> 
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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-05 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 13:36 request - trailing # comments are silently non-functional in .gitignore Jim Cromie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).