From: Jim Cromie <jim.cromie@gmail.com>
To: git@vger.kernel.org
Subject: request - trailing # comments are silently non-functional in .gitignore
Date: Mon, 05 May 2008 07:36:24 -0600 [thread overview]
Message-ID: <481F0D58.50204@gmail.com> (raw)
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)
reply other threads:[~2008-05-05 13:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481F0D58.50204@gmail.com \
--to=jim.cromie@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.