From: Paolo Bonzini <bonzini@gnu.org>
To: Sebastian Schubert <schubert.seb@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: more fancy ignoring of files ('if' in .gitignore?)
Date: Tue, 27 Oct 2009 11:00:27 +0100 [thread overview]
Message-ID: <4AE6C4BB.5060403@gnu.org> (raw)
In-Reply-To: <200910271030.54571.schubert.seb@googlemail.com>
On 10/27/2009 10:30 AM, Sebastian Schubert wrote:
> Hi,
>
> I would like to ignore files if certain other files are present. In my
> special case, I want to ignore foo.pdf and foo.eps if foo.fig is
> present (both pdf and eps are generated on the fly but don't belong
> into repository). In general, I do NOT want to ignore pdf or eps. There
> are a lot of foos so I would like to have a general solution.
>
> Is this possible?
I suggesting adding to your makefile a rule like
.gitignore: $(wildcard *.fig)
(grep -ve \.pdf$ \.eps$ .gitignore;
for i in $^; do echo $i; done | \
sed -n 's/fig$/eps/p; s/eps$/pdf/p') > .gitignore.tmp
mv .gitignore.tmp .gitignore
Paolo
prev parent reply other threads:[~2009-10-27 10:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 9:30 more fancy ignoring of files ('if' in .gitignore?) Sebastian Schubert
2009-10-27 9:56 ` Michael J Gruber
2009-10-27 10:00 ` Paolo Bonzini [this message]
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=4AE6C4BB.5060403@gnu.org \
--to=bonzini@gnu.org \
--cc=git@vger.kernel.org \
--cc=schubert.seb@googlemail.com \
/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 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).