From: Eric Sunshine <sunshine@sunshineco.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: christophe.bliard@trux.info, Git List <git@vger.kernel.org>,
Rafael Ascensao <rafa.almas@gmail.com>
Subject: Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching
Date: Sat, 3 Nov 2018 20:25:14 -0400 [thread overview]
Message-ID: <CAPig+cS7b0nenb0+0jyXE=-bDkhapmYE8Yr6VfyAWRq3ydjPOg@mail.gmail.com> (raw)
In-Reply-To: <20181103153049.22850-1-pclouds@gmail.com>
On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> Rules 8 and 18 are now updated to be less eager. We conclude that the
> current entry is positively matched and included. But we say nothing
> about remaining entries. tree_entry_interesting() will be called again
> for those entries where we will determine entries individually.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> diff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh
> @@ -194,4 +194,21 @@ test_expect_success 'multiple exclusions' '
> +test_expect_success 't_e_i() exclude case #8' '
> + git init case8 &&
> + (
> + cd case8 &&
> + echo file >file1 &&
> + echo file >file2 &&
> + git add . &&
Won't this loose git-add invocation end up adding all the junk files
from earlier tests? One might have expected to see the more restricted
invocation:
git add file1 file2 &&
to make it easier to reason about the test and not worry about someone
later inserting tests above this one which might interfere with it.
> + git commit -m twofiles &&
> + git grep -l file HEAD :^file2 >actual &&
> + echo HEAD:file1 >expected &&
> + test_cmp expected actual &&
> + git grep -l file HEAD :^file1 >actual &&
> + echo HEAD:file2 >expected &&
> + test_cmp expected actual
> + )
> +'
next prev parent reply other threads:[~2018-11-04 0:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGOLd-7Hi+tssj4ozKPd04squ-PuFwtt6f2nhbZp-zKwy62pVQ@mail.gmail.com>
2018-10-24 14:53 ` bug?: git grep HEAD with exclude in pathspec not taken into account Christophe Bliard
2018-10-24 15:14 ` Duy Nguyen
2018-10-24 15:39 ` Christophe Bliard
2018-10-27 14:57 ` Duy Nguyen
2018-11-03 15:30 ` [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching Nguyễn Thái Ngọc Duy
2018-11-04 0:25 ` Eric Sunshine [this message]
2018-11-04 6:27 ` Eric Sunshine
2018-11-04 6:29 ` Duy Nguyen
2018-11-04 5:28 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2018-11-05 1:50 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPig+cS7b0nenb0+0jyXE=-bDkhapmYE8Yr6VfyAWRq3ydjPOg@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=christophe.bliard@trux.info \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=rafa.almas@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).