Files
lazygit/test/default_test_config/config.yml
Stefan Haller 3050303ed2 Detect external ref changes via background polling
Add a 2-second background poll that calls Status.RefsSnapshot and
compares against the snapshot stored at the end of the last refs-
touching refresh. On a diff, trigger a full refresh — same scope as the
focus-in handler, because once we know something changed externally
we can't be sure what (an agent might have created a worktree or
stashed something alongside the commit we detected).

Refresh runs in SYNC mode because goEvery already serializes iterations
via <-done: a slow refresh delays the next tick naturally instead of
letting work stack. The post-refresh hook from the previous commit
updates the snapshot, so in-app commands don't cause the next poll to
spuriously re-fire.

Disabled in the integration test config, like autoRefresh and autoFetch,
because demo replays make repo changes throughout the run; at 2-second
cadence the resulting full refreshes compete with the demo's own
choreography and push some demos past their 40-second timeout.

Also list the two new config keys in checkForChangedConfigsThatDontAutoReload
so a config edit warns the user that lazygit needs a restart.
2026-06-19 18:07:48 +02:00

24 lines
886 B
YAML

# This config is used in our integration tests. If we want to modify this for a specific test, you can do so in the SetupConfig function
disableStartupPopups: true
promptToReturnFromSubprocess: false
gui:
theme:
activeBorderColor:
- green
- bold
inactiveBorderColor:
- black
# Not important in tests but it creates clutter in demos
showRandomTip: false
animateExplosion: false # takes too long
git:
# We don't want to run any periodic background git commands because it'll introduce race conditions and flakiness.
# If we need to refresh something from within the test (which should only really happen if we've invoked a
# shell command in the background) we should have the user press shift+R to refresh.
# TODO: add tests which explicitly test auto-refresh functionality
autoRefresh: false
autoFetch: false
autoDetectExternalChanges: false