jesseduffield.lazygit/pkg/gui
Stefan Haller 4f6cdedb1e Refresh worktrees before auto-forwarding branches
AutoForwardBranches relies on the worktree model to skip any branch
that's currently checked out in another worktree (so we don't update
its ref behind the worktree's back). The post-fetch refresh wasn't
including the worktrees scope, so any external change to the worktree
list between lazygit's startup and the fetch — a `git worktree add`,
a `git checkout` in a linked worktree, a branch rename — left the
in-memory model stale and the skip check returned false negatives.

Add WORKTREES to the post-fetch refresh scope when auto-forwarding is
enabled. We gate on the config so users with auto-forward disabled
don't pay for an extra `git worktree list` plus per-worktree rev-parse
on every fetch tick.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:59:18 +02:00
..
context Remove Render() from ListContextTrait.HandleRender 2026-05-09 13:58:33 +02:00
controllers Refresh worktrees before auto-forwarding branches 2026-05-21 13:59:18 +02:00
filetree Make file sort order and case sensitivity configurable 2026-03-30 17:53:25 +02:00
mergeconflicts Fix linter warnings about ignoring errors from bufio.Scanner 2026-05-03 16:57:24 +02:00
modes Make Commit.Hash a getter for an unexported hash field 2025-04-29 14:57:15 +02:00
patch_exploring Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
popup Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
presentation Use more widely-supported Unicode symbols for the commit graph 2026-05-04 13:06:29 +02:00
services/custom_commands Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
status Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
style Modernize all codes 2025-11-15 10:46:23 +01:00
types Support to request a content-only UI refresh 2026-05-06 18:53:32 +02:00
background.go Extract BranchesHelper.PostFetchRefresh to unify the two fetch paths 2026-05-21 13:57:46 +02:00
command_log_panel.go Cleanup: remove unnecessary function Label() 2026-04-30 22:14:26 +02:00
context.go Bump gocui (and tcell) 2025-12-23 16:49:16 +01:00
context_config.go Remove some unused code 2025-07-08 15:14:45 +02:00
controllers.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
dummies.go Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
editors.go Move modifiers into Key 2026-04-30 22:22:53 +02:00
extras_panel.go Add Key type 2026-04-30 22:14:26 +02:00
global_handlers.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
gui.go Support to request a content-only UI refresh 2026-05-06 18:53:32 +02:00
gui_common.go Support to request a content-only UI refresh 2026-05-06 18:53:32 +02:00
gui_driver.go Move modifiers into Key 2026-04-30 22:22:53 +02:00
information_panel.go Rename ModeStatus.Description to InfoLabel 2025-08-14 17:59:38 +02:00
keybindings.go Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
layout.go Fix visual glitch with status bar spinner at very slow spinner rates 2026-05-08 22:42:23 +02:00
main_panels.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
menu_panel.go Get rid of pkg/gui/keybindings package 2026-04-30 22:22:53 +02:00
options_map.go Move keybindings.LabelFromKey to config package 2026-04-30 22:22:53 +02:00
pty.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
pty_windows.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
recent_repos_panel.go Remove unused field gui.IsNewRepo 2024-12-01 10:44:26 +01:00
tasks_adapter.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
test_mode.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
view_helpers.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
views.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00