On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy <[email protected]> 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 <[email protected]>
> ---
> 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
> + )
> +'