Skip to content

Make cache .gitignore updates configurable - #3

Open
willhains wants to merge 1 commit into
moonolgerd:mainfrom
willhains:agent/configurable-cache-gitignore
Open

Make cache .gitignore updates configurable#3
willhains wants to merge 1 commit into
moonolgerd:mainfrom
willhains:agent/configurable-cache-gitignore

Conversation

@willhains

Copy link
Copy Markdown

Summary

  • Check Git's complete ignore configuration with git check-ignore before changing a repository's .gitignore.
  • Add copilot-specs.cacheGitignoreBehavior with auto, prompt, and disabled modes.
  • Remember prompt decisions separately for each workspace folder.
  • Apply the behaviour correctly in multi-root workspaces.

Why

The extension currently attempts to add .copilot-specs-cache/ during activation.
The helper only inspects the repository's own .gitignore, so it modifies a tracked project file even when Git already ignores the cache through core.excludesFile or another supported source.
Users also have no way to opt out or ask the extension to prompt first.

User impact

The default remains auto for compatibility, but the extension now leaves .gitignore unchanged when Git already ignores the cache.
Users can choose prompt to approve the change per workspace folder, or disabled to manage ignore rules themselves.

Validation

  • npm run compile
  • npm test -- --disable-extensions - 58 passing
  • npm run lint could not run because the repository does not install an eslint executable; the existing script exits with eslint: command not found.

@willhains
willhains marked this pull request as ready for review July 22, 2026 00:26
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