@@ -4285,15 +4285,21 @@ fn top_level_slash_with_negations() -> crate::Result {
4285
4285
assert_eq ! (
4286
4286
out,
4287
4287
walk:: Outcome {
4288
- read_dir_calls: 0 ,
4288
+ read_dir_calls: 2 ,
4289
4289
returned_entries: entries. len( ) ,
4290
- seen_entries: 1 ,
4290
+ seen_entries: 5 ,
4291
4291
}
4292
4292
) ;
4293
4293
assert_eq ! (
4294
4294
entries,
4295
- & [ entry( "" , Ignored ( Expendable ) , Directory ) ] ,
4296
- "This is wrong - the root can never be listed"
4295
+ & [
4296
+ entry_nokind( ".git" , Pruned ) . with_property( DotGit ) . with_match( Always ) ,
4297
+ entry( ".github/workflow.yml" , Tracked , File ) ,
4298
+ entry( ".gitignore" , Tracked , File ) ,
4299
+ entry( "file" , Untracked , File ) ,
4300
+ entry( "readme.md" , Tracked , File ) ,
4301
+ ] ,
4302
+ "the top-level is never considered ignored"
4297
4303
) ;
4298
4304
4299
4305
let ( ( out, _root) , entries) = collect ( & root, None , |keep, ctx| {
@@ -4319,14 +4325,10 @@ fn top_level_slash_with_negations() -> crate::Result {
4319
4325
assert_eq ! (
4320
4326
entries,
4321
4327
& [
4322
- entry_nokind( ".git" , Ignored ( Expendable ) )
4323
- . with_property( DotGit )
4324
- . with_match( Always ) ,
4325
- entry( "file" , Ignored ( Expendable ) , File )
4328
+ entry_nokind( ".git" , Pruned ) . with_property( DotGit ) . with_match( Always ) ,
4329
+ entry( "file" , Untracked , File )
4326
4330
] ,
4327
- "This is still wrong, but consistent within what it should do.\
4328
- Top-level `.git` should always be Pruned, even if ignored.\
4329
- Except for `file` which should be untracked."
4331
+ "And the negated file is correctly detected as untracked"
4330
4332
) ;
4331
4333
}
4332
4334
Ok ( ( ) )
0 commit comments