···36 parent := fullpath
37 fullpath = path.Join(fullpath, part)
3839- if _, ok := m[fullpath]; ok {
0000000040 continue
41 }
42
···36 parent := fullpath
37 fullpath = path.Join(fullpath, part)
3839+ // It's possible that the first occurrence of subdirectory is skipped.
40+ // The parent node can be created with SkipWorktree set to true, but
41+ // if any future children do not skip their subtree, the entire lineage
42+ // of the tree needs to have this value set to false so that subdirectories
43+ // are not ignored.
44+ if parentNode, ok := m[fullpath]; ok {
45+ if e.SkipWorktree == false {
46+ parentNode.skip = false
47+ }
48 continue
49 }
50