Skip to content

Feature: .gitignore should also act as .cgcignore #729

Closed

Description

@karladler

Feature request:

Nothing in .gitignore should be indexed, so usually we must not create a .cgcignore file.
In case we still need something to index, which is in .gitignore ist still could be added as a negated pattern (! prefixed) to the .cgcignore.

Activity

  1. github-actions commented on Mar 16, 2026

    @github-actions
    Contributor

    Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

  2. moved this from Backlog tasks to In progress in CGC Progress Boardon Aug 28, 2026
  3. AloysJehwin commented on Aug 28, 2026

    @AloysJehwin
    Contributor

    Opened #1680 for this. Layering is defaults → .gitignore → .cgcignore, and since matching is last-match-wins the escape hatch you described works: dist/ in .gitignore plus !dist/ in .cgcignore still indexes it. It hooks into build_ignore_spec, the one place discovery, the SCIP pipeline and the watcher already share, so all three pick it up.

    One thing worth a maintainer's call: it changes what gets indexed by default for existing repos. Easy to put behind a config flag if opt-in is preferred.

  4. moved this from In progress to Done in CGC Progress Boardon Sep 2, 2026
  5. added 4 commits that reference this issue on Sep 2, 2026
    46fa461
    56fa1cb
    6a19afc
    a042c67
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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions