Skip to content

fix(discover): honor root .gitignore when indexing subfolders#517

Open
Bortlesboat wants to merge 1 commit into
DeusData:mainfrom
Bortlesboat:fix/subfolder-root-gitignore-510
Open

fix(discover): honor root .gitignore when indexing subfolders#517
Bortlesboat wants to merge 1 commit into
DeusData:mainfrom
Bortlesboat:fix/subfolder-root-gitignore-510

Conversation

@Bortlesboat

Copy link
Copy Markdown

Summary

  • load .gitignore from the indexed path even when that path is a subfolder without its own .git/
  • add a regression test that indexes repo/pkg and verifies pkg/.gitignore still excludes secret.py
  • keep the .cbmignore override behavior from issue #510 out of scope for this PR

Related

Verification

  • git diff --check
  • focused discover-only runner built under WSL with cc ... tests/test_discover.c ... src/discover/*.c ... -> 75 passed

Signed-off-by: Andrew Barnes <bortstheboat@gmail.com>
@Bortlesboat Bortlesboat marked this pull request as ready for review June 20, 2026 16:41
@DeusData

Copy link
Copy Markdown
Owner

Thanks @Bortlesboat — this reviewed clean and is ready, but it now conflicts with main (src/discover/discover.c shifted under a just-merged change). Could you rebase on latest main? One small thing to confirm while you're in there: does cbm_gitignore_load return NULL cleanly for a non-existent file? The now-unconditional load relies on that. I'll merge once it's rebased. 🙏

@DeusData

Copy link
Copy Markdown
Owner

Thanks @Bortlesboat — clean fix and a good reproduce-first test; it just needs a rebase on latest main (now conflicting). Rebase and I'll merge. 🙏

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