Skip to content

fix: .cbmignore negation overrides built-in skip directories#543

Open
mvanhorn wants to merge 1 commit into
DeusData:mainfrom
mvanhorn:fix/500-cbmignore-negation-overrides-builtin-skip-dirs
Open

fix: .cbmignore negation overrides built-in skip directories#543
mvanhorn wants to merge 1 commit into
DeusData:mainfrom
mvanhorn:fix/500-cbmignore-negation-overrides-builtin-skip-dirs

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

What does this PR do?

Lets a .cbmignore negation pattern (e.g. !obj/) un-skip a directory that is in the built-in ALWAYS_SKIP_DIRS set, so users can opt a normally-skipped directory back into discovery. This ships the negation-override half of #500 the maintainer described; the joint config-key default-override (#497) is deferred.

Refs #500

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects
    unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

AI was used for assistance.

@DeusData

Copy link
Copy Markdown
Owner

Thanks @mvanhorn — this reviewed clean and is ready (the negation-override logic is sound and well-tested). It now conflicts with main (src/discover/discover.c). Could you rebase on latest main? I'll merge once it's conflict-free. 🙏

@DeusData

Copy link
Copy Markdown
Owner

Thanks @mvanhorn — this is clean and well-tested, and I appreciate the scope discipline (deferring the #497 half). It's now conflicting with main — could you rebase? I'll merge once it's conflict-free. 🙏

Implements 2026-06-20-014-fix-cbmignore-negation-overrides-builtin-skip-dirs.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@mvanhorn mvanhorn force-pushed the fix/500-cbmignore-negation-overrides-builtin-skip-dirs branch from 2d85d9a to 99ae66f Compare June 24, 2026 01:36
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Thanks @DeusData! Rebased onto latest main. The conflicts were in discover.c and test_discover.c where your global_gi work and this PR's cbmignore_negation_overrides both extended the same should_skip_directory/walk_dir signatures and the discover test helpers. Resolved by threading both parameters through every signature and call site, and keeping both sets of tests (your .git/info/exclude tests and the negation tests) under the unified discover_has_rel_path helper. All discover tests pass locally and the touched files are clang-formatted. Should be conflict-free now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants