Skip to content

fix: stop browse editing tracked .gitignore#923

Open
fedster99 wants to merge 1 commit intogarrytan:mainfrom
fedster99:fedster99/browse-ignore-fix
Open

fix: stop browse editing tracked .gitignore#923
fedster99 wants to merge 1 commit intogarrytan:mainfrom
fedster99:fedster99/browse-ignore-fix

Conversation

@fedster99
Copy link
Copy Markdown

Summary

  • stop browse from mutating the tracked project .gitignore as part of startup
  • ignore .gstack/ through repo-local Git exclude metadata instead, including worktree repos
  • move the ignore write into the locked CLI startup path and harden the config tests

Problem

browse was appending .gstack/ to the tracked .gitignore file during startup. That left surprise worktree diffs in user repos, and because the write happened outside the startup lock it could race and append duplicate .gstack/ lines.

Fix

  • split state-dir creation from Git ignore mutation
  • resolve the repo-local exclude path for both normal repos and worktrees
  • write .gstack/ to Git exclude metadata from the locked CLI path only
  • make the config tests self-contained with temp git repos so they pass outside a git checkout too

Verification

  • bun test browse/test/config.test.ts
  • bun run build

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