Skip to content

Feature request: git commit indexing for a workspace folder that contains several repos #747

Open

Description

@null-axiom

What happened?

Magic Context: 0.49.13 (unchanged in 0.49.15).

My main workspace is a plain folder that holds several git repos:

workspace/          ← sessions start here; not a git repo
  service-a/        ← repo
  service-b/        ← repo
  service-c/        ← repo
  … (9 repos in total)

memory.git_commit_indexing only indexes the session folder's own HEAD, and indexCommitsForProject returns nonIndexable for not_a_repo. Commit search therefore never finds anything here, although the folder holds plenty of history. Starting sessions inside each repo isn't practical, since the work spans several of them.

Would you consider indexing the immediate child repos when the session folder isn't itself a repo? For example:

  • Opt in, e.g. git_commit_indexing.nested_repos: true or a list of paths.
  • Limit to one level deep, and skip node_modules and similar.
  • Results labelled with the repo name, so ctx_search hits say which repo a commit came from.
  • The existing since_days / max_commits caps applied per repo, or across all of them.

Related: a session rooted in any non-git folder gets a dir: identity, so commit search is always empty there, and the git sweep still logs [git-commits] sweep skipped for dir:… cooldown active on every 15-minute tick for such projects (467 lines in 1.3 days here). plugin/dream-timer.ts:834-841 logs on every cooldown_active, although :853-858 parks dir: projects for 24 h. Logging once per park, and skipping dir: identities before calling git log, would remove that noise. Closest existing issues: #555, #717.

If nested indexing doesn't fit the design, for example because mixing commits from unrelated repos would hurt search quality, that's an understandable no. I wanted to check whether a folder-of-repos layout is something you'd support.

Activity

  1. magic-alfonso commented on Oct 20, 2026

    @magic-alfonso

    Thanks. You're right about today's behaviour: commit indexing reads only the session folder's own repository, so a non-git folder of several repos indexes nothing, and its sweep logs a skip line every tick. The log noise is a bug and is being fixed with issue 746. Indexing child repositories is a feature decision; I'll come back to you on whether we take it.

  2. magic-alfonso commented on Oct 22, 2026

    @magic-alfonso

    0.49.17 quiets the non-git case. A folder that isn't a git repository now skips the commit probe and logs once per parking interval instead of on every maintenance tick. Indexing commits from repositories nested inside such a folder is still under consideration, so I'm keeping this open.

  3. magic-alfonso commented on Oct 25, 2026

    @magic-alfonso

    We'll take this as an opt-in setting. When the session folder isn't itself a git repository, Magic Context will index the commits of its immediate child repositories. It goes one level deep and skips dependency folders such as node_modules. Each result will be labelled with the repository it came from, so a ctx_search hit says which repo a commit belongs to, and the existing since_days and max_commits limits will apply to each repository. It stays off unless you turn it on, so single-repo sessions behave exactly as they do today.

    The build is queued behind a larger change we're finishing first. We'll post here when it lands.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions