Skip to content

Conversation

@cole-miller
Copy link
Member

@cole-miller cole-miller commented Oct 20, 2025

This PR does two related things:

  • First, it gets rid of the undifferentiated RepositoryEvent::Updated in favor of three new events that have clearer definitions: BranchChanged, StashEntriesChanged, and StatusesChanged. An implication of this is that we no longer emit a RepositoryEvent unless some git state changed; previously we would emit RepositoryUpdated after doing a git status scan even if no statuses changed.
  • Second, it changes the subscription strategy of the project diff to make it update more robustly. Previously, the project diff only subscribed to the GitStore, so it relied on getting a GitStoreEvent when some buffer's diff hunks changed, even if the git status of the buffer's file didn't change (e.g. a second hunk in a file that was already modified). After this PR, it also subscribes to the individual BufferDiff entities for buffers that have a git status, so the GitStore is freed from that responsibility. This also fixes some real cases where the previous strategy was not effective in keeping the project diff up to date (captured in a test).

Release Notes:

  • Fixed some cases where the project diff would fail to update in response to git events.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 20, 2025
@cole-miller cole-miller self-assigned this Oct 20, 2025
@cole-miller cole-miller enabled auto-merge (squash) October 23, 2025 16:21
@cole-miller cole-miller merged commit 8b6f3ec into main Oct 23, 2025
21 checks passed
@cole-miller cole-miller deleted the uncommit-diff branch October 23, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants