@@ -424,9 +424,24 @@ test_expect_success 'local ignore inside a sub-directory with --verbose' '
424424 )
425425'
426426
427- test_expect_success_multi ' nested include' \
428- ' a/b/.gitignore:8:!on* a/b/one' '
429- test_check_ignore "a/b/one"
427+ test_expect_success ' nested include of negated pattern' '
428+ expect "" &&
429+ test_check_ignore "a/b/one" 1
430+ '
431+
432+ test_expect_success ' nested include of negated pattern with -q' '
433+ expect "" &&
434+ test_check_ignore "-q a/b/one" 1
435+ '
436+
437+ test_expect_success ' nested include of negated pattern with -v' '
438+ expect "a/b/.gitignore:8:!on* a/b/one" &&
439+ test_check_ignore "-v a/b/one" 0
440+ '
441+
442+ test_expect_success ' nested include of negated pattern with -v -n' '
443+ expect "a/b/.gitignore:8:!on* a/b/one" &&
444+ test_check_ignore "-v -n a/b/one" 0
430445'
431446
432447# ###########################################################################
@@ -460,7 +475,6 @@ test_expect_success 'cd to ignored sub-directory' '
460475 expect_from_stdin <<-\EOF &&
461476 foo
462477 twoooo
463- ../one
464478 seven
465479 ../../one
466480 EOF
@@ -543,7 +557,6 @@ test_expect_success 'global ignore' '
543557 globalthree
544558 a/globalthree
545559 a/per-repo
546- globaltwo
547560 EOF
548561 test_check_ignore "globalone per-repo globalthree a/globalthree a/per-repo not-ignored globaltwo"
549562'
586599cat << -\EOF >expected-default
587600 one
588601 a/one
589- a/b/on
590- a/b/one
591- a/b/one one
592- a/b/one two
593- "a/b/one\"three"
594- a/b/two
595602 a/b/twooo
596- globaltwo
597- a/globaltwo
598- a/b/globaltwo
599- b/globaltwo
600603EOF
601604cat << -EOF >expected-verbose
602605 .gitignore:1:one one
@@ -696,8 +699,12 @@ cat <<-EOF >expected-all
696699 $global_excludes :2:!globaltwo ../b/globaltwo
697700 :: c/not-ignored
698701EOF
702+ cat << -EOF >expected-default
703+ ../one
704+ one
705+ b/twooo
706+ EOF
699707grep -v ' ^:: ' expected-all > expected-verbose
700- sed -e ' s/.* //' expected-verbose > expected-default
701708
702709broken_c_unquote stdin > stdin0
703710
0 commit comments