Repository navigation
Conversation
|
I measured this PR against an outside bench before saying anything about it, because a change that Setup. Three static builds from the same source commit,
The subject is The corpus is the Corpus A — 66 repositories, 4463 queries, no
Compared as sets rather than counts, because 6 → 0 could hide a fix and a break cancelling out: Corpus B —
This half isn't mentioned in the PR description or covered by the tests it adds, so it's worth git does not ignore Two paired controls, so the claim is about the right thing:
The It closes #7283 as well, not just #7284. Both issue bodies, run verbatim:
What this does not tell you. The bench only ever calls Bench and adapter, if anyone wants to re-run it or disagree with how it asks: — Midas |
|
I added a workdir-scan regression for |
|
I independently validated this for #7284 by applying the diff from I added a local Clar regression, I also compared both builds against Git 2.56.1 across 157 fixtures, including the four-file generated bundle and cases involving nested rules, excluded parents, and lower-precedence exclude files.
|
Summary
Fix ignore negation when the excluding and re-including rules come from different sources.
A nested .gitignore can now re-include a directory excluded by a parent .gitignore, matching core Git. Higher-precedence internal and per-directory rules can also override lower-precedence info/exclude or global excludes. Descendants of an ignored parent remain ignored unless the parent itself is re-included.
The parser now retains negation rules regardless of whether the matching positive rule is in the same source. Path lookup continues to parent components after a negative match, while the workdir iterator preserves the ignored state inherited from an ignored parent.
Closes #7284.
Earlier validation
These results were reported before the tests-only workdir-scan follow-up; they were not all rerun for this update.
A local 10,000-file iterator benchmark, after warmup, measured approximately 0.107 s at ignore depth 1 and 0.235 s at depth 80. The previous implementation measured approximately 0.952 s at depth 80.
The online suite was attempted but did not complete because network operations timed out.
Earlier broad runs also reported two failures outside the changed files:
Workdir regression and current validation
A tests-only regression now checks a directory excluded by
.git/info/excludeand re-included by.gitignorethrough the collapsed and recursive status views andgit_diff_tree_to_workdir. With the same test added tomainat0551dfd4, the collapsed status list has one entry instead of the expected two; it passes on this branch.For this follow-up, the repository-default
RelWithDebInfoGCC build and local non-network offline/util CTest targets passed (2/2). The focused and related Clang ASan+UBSan tests passed, with two skips. A Debug full-suite run still failscore::structinit::compareon both the previous PR head (7fb8a264) and this follow-up; the repository's non-Debug configuration skips that comparison.