From: Joe Perches <joe@perches.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-apply - Add --include=PATH
Date: Sun, 24 Aug 2008 14:57:43 -0700 [thread overview]
Message-ID: <1219615063.18365.141.camel@localhost> (raw)
In-Reply-To: <7viqtrw7up.fsf@gitster.siamese.dyndns.org>
On Sat, 2008-08-23 at 17:54 -0700, Junio C Hamano wrote:
> Joe Perches <joe@perches.com> writes:
> > Add similar capability to --exclude=
> > Allows selection of files to patch from a
> > large patchset.
> Thanks; I don't see anything fundamentally wrong with what this patch
> tries to achieve.
>
> > @@ -2996,10 +2996,16 @@ static struct excludes {
> > const char *path;
> > } *excludes;
> >
> > +static struct includes {
> > + struct includes *next;
> > + const char *path;
> > +} *includes;
>
> Now this is ugly. You can just add a new variable "*includes" that is of
> exactly the same type as existing "*excludes" without introducing a new
> type.
Yes, it's slightly ugly, but it was less work and much easier for
a human to parse. I also didn't want to use "struct excludes"
for includes which I thought even uglier.
> You should then find it disturbing that the shared type is still called
> "struct excludes" even though it is now used for things you would want to
> include. You are right. You can then either rename it to a more neutral
> name, or (even better) use an existing type, such as "string_list".
I'm on holiday for a few days, but I'll submit 2 patches later:
1. Rename struct excludes to struct path_list
2. Add --includes
cheers, Joe
next prev parent reply other threads:[~2008-08-24 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-23 20:37 [PATCH] git-apply - Add --include=PATH Joe Perches
2008-08-24 0:54 ` Junio C Hamano
2008-08-24 21:57 ` Joe Perches [this message]
2008-08-25 8:05 ` Junio C Hamano
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=1219615063.18365.141.camel@localhost \
--to=joe@perches.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).