Repository navigation
fix(watch): refresh remote status after terminal git push - #1044
Merged
danyaberezun merged 7 commits intoNov 11, 2026
Merged
Conversation
OKAN TIKTAS (OKAN-SOFTWARE)
requested review from
Olga Lavrichenko (OLavrik),
Rustam Sadykov (SBOne-Kenobi),
danyaberezun and
Rinat S (rsolmano)
as code owners
October 29, 2026 22:32
5 tasks done
# Conflicts: # packages/server/src/watch/SPEC.md
ThinkRail branches are created --no-track, so after 'git push origin HEAD' there is no upstream config and the config-parsing watch saw nothing. Watch, non-recursively, the checked-out branch name under every refs/remotes/<remote>/ in the shared git dir plus packed-refs, and re-derive the targets whenever the repo-metadata nudge fires (branch switch, pack-refs, a new remote dir). Drops the hand-written git config parser.
…helper Keeps the remote-ref helpers next to scheduleRepoMeta, away from watchGitDir, so this composes with JetBrains#1104's git-dir watcher change with only one-line conflicts.
danyaberezun
requested review from
Andrey Markin (Mark-Life) and
artyomxx
as code owners
November 11, 2026 15:21
Collaborator
|
Thanks for covering |
The remote-ref watch set was keyed by each directory's inode so a deleted-and-recreated dir would be re-watched. `git pack-refs --all` deletes the emptied refs/remotes/<remote>/ and the next push recreates it; on ext4 the new dir often reuses the old inode number, so the key did not change and the watch stayed bound to the deleted directory, missing every later push. Close and re-create the handful of non-recursive ref watches on each nudge instead.
danyaberezun
approved these changes
Nov 11, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 11, 2026
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A
git pushfrom a terminal in a linked worktree can leave the Remote indicator showing stale information until another filesystem event occurs or the window regains focus.The existing watcher observes the worktree and its private Git directory, but push-related remote-tracking updates occur in the shared Git directory.
Approach
Add narrowly scoped watchers for shared Git metadata and the configured remote-tracking reference.
The implementation avoids recursively watching every Git reference, debounces notifications using the existing mechanism, and closes the additional watchers during workspace cleanup.
Changes
The implementation reads standard Git branch tracking configuration directly; more unusual configurations, such as
includeIf, are not covered by the new tests.Screenshots
Not applicable — no frontend changes.
Related issues
Closes #1009.
Verification
git diff --checkpassedThe focused Windows regression tests pass. Full-suite and other-platform verification remain outstanding.