git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH 8/8] tree_entry_interesting(): support negative pathspec
Date: Wed, 15 Sep 2010 08:46:26 +1000	[thread overview]
Message-ID: <AANLkTinkGpWGXTEpDqm4zPRky06C9X9xUoo2roKH2kG=@mail.gmail.com> (raw)
In-Reply-To: <7vd3sg8fjn.fsf@alter.siamese.dyndns.org>

2010/9/15 Junio C Hamano <gitster@pobox.com>:
>> diff --git a/tree-walk.c b/tree-walk.c
>> index a2f4a00..fd19681 100644
>> --- a/tree-walk.c
>> +++ b/tree-walk.c
>> @@ -532,7 +532,7 @@ int tree_entry_interesting(const struct name_entry *entry, const char *base, int
>>
>>       pathlen = tree_entry_len(entry->path, entry->sha1);
>>
>> -     for (i = 0; i < ps->nr; i++) {
>> +     for (i = ps->nr-1; i >= 0; i--) {
>
> No explanation in the commit log message why.  Besides, spell binary "-"
> operator with a SP each on both ends, please.
>
> Also the code seems to use a new term subpathspec without defining nor
> explaining.  Not good.

No, not good. It also has bugs as Elijah pointed out. I'm going to
submit these last two patches as a separate series that will make
negative match work on (hopefully) all commands.

Thanks for your comments.
-- 
Duy

  reply	other threads:[~2010-09-14 22:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 15:50 [PATCH 0/8] en/object-list-with-pathspec v4 Nguyễn Thái Ngọc Duy
2010-09-08 15:50 ` [PATCH 1/8] diff-no-index: use diff_tree_setup_paths() Nguyễn Thái Ngọc Duy
2010-09-08 15:50 ` [PATCH 2/8] Introduce struct tree_pathspec_list Nguyễn Thái Ngọc Duy
2010-09-08 15:50 ` [PATCH 3/8] tree_entry_interesting(): remove dependency on struct diff_options Nguyễn Thái Ngọc Duy
2010-09-14 15:59   ` Junio C Hamano
2010-09-14 22:33     ` Nguyen Thai Ngoc Duy
2010-09-14 23:20       ` Junio C Hamano
2010-09-08 15:50 ` [PATCH 4/8] tree-walk: move tree_entry_interesting() from tree-diff.c Nguyễn Thái Ngọc Duy
2010-09-08 15:50 ` [PATCH 5/8] Add testcases showing how pathspecs are ignored with rev-list --objects Nguyễn Thái Ngọc Duy
2010-09-14 16:02   ` Junio C Hamano
2010-09-08 15:50 ` [PATCH 6/8] Make rev-list --objects work together with pathspecs Nguyễn Thái Ngọc Duy
2010-09-08 15:50 ` [PATCH 7/8] setup_tree_pathspec(): interpret '^' as negative pathspec Nguyễn Thái Ngọc Duy
2010-09-11 17:29   ` Elijah Newren
2010-09-13  1:39     ` Nguyen Thai Ngoc Duy
2010-09-14 16:06   ` Junio C Hamano
2010-09-14 22:41     ` Nguyen Thai Ngoc Duy
2010-09-08 15:50 ` [PATCH 8/8] tree_entry_interesting(): support " Nguyễn Thái Ngọc Duy
2010-09-11 17:33   ` Elijah Newren
2010-09-14 16:18   ` Junio C Hamano
2010-09-14 22:46     ` Nguyen Thai Ngoc Duy [this message]
2010-09-11 17:19 ` [PATCH 0/8] en/object-list-with-pathspec v4 Elijah Newren

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='AANLkTinkGpWGXTEpDqm4zPRky06C9X9xUoo2roKH2kG=@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.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).