Skip to content

feat: configurable git submodule support + sparse-checkout e2e test#473

Open
dmtrKovalenko wants to merge 3 commits into
mainfrom
fix/sparse-checked-repos
Open

feat: configurable git submodule support + sparse-checkout e2e test#473
dmtrKovalenko wants to merge 3 commits into
mainfrom
fix/sparse-checked-repos

Conversation

@dmtrKovalenko
Copy link
Copy Markdown
Owner

@dmtrKovalenko dmtrKovalenko commented May 15, 2026

No description provided.

Adds `support_submodules` (default true) to FilePickerOptions, threaded
through ScanConfig, the background watcher, the Lua module, and the
fff-c FFI (new `fff_create_instance3`; `fff_create_instance2` keeps the
existing default). When false, submodule directories are pruned from
the WalkBuilder via `Repository::submodules()` and excluded from
`StatusOptions`. Lua exposes the toggle as `config.git.support_submodules`.

Adds an e2e integration test that drives a real `git clone --no-checkout`
+ cone-mode `sparse-checkout` and asserts the picker indexes only the
materialized files and never panics on libgit2 statuses for
non-materialized paths.
The previous version of the test only asserted that the indexed file
list excluded the sparse files. It did not actually probe the branch
that handles libgit2 returning statuses for paths that are in the
index but not on disk.

This:
- captures fff tracing into a per-test buffer,
- asserts libgit2 actually returns the sparse-excluded paths (so the
  test would regress to a no-op if libgit2's behavior changed),
- exercises both the sync `collect_files` and the async
  `new_with_shared_state` + `refresh_git_status` pipelines,
- requires the documented `Git status for path not in index, skipping`
  debug message to be emitted at least once,
- fails on any unexpected ERROR/WARN line from fff core.
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.

1 participant