jesseduffield.lazygit/pkg
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
..
app Change a-enter keybinding to m-enter on mac, and c-enter elsewhere 2026-04-30 22:22:53 +02:00
cheatsheet Remove the keybindings legend in the cheatsheets 2026-04-30 22:38:53 +02:00
commands Optimize regex compilations 2026-05-10 15:28:14 +02:00
common Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
config Validate that gui.spinner.frames must all have the same width 2026-05-06 18:53:32 +02:00
constants Make the links in the status panel point to the current version rather than master 2024-03-22 08:13:59 +01:00
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes Modernize all codes 2025-11-15 10:46:23 +01:00
gocui When drawing tainted views in ForceFlushViewsContentOnly, also draw views that overlap them 2026-05-09 13:58:33 +02:00
gui Refresh worktrees before auto-forwarding branches 2026-05-21 13:59:18 +02:00
i18n Revert the change of <ctrl+j>/<ctrl+k> to <alt+down>/<alt+up> 2026-05-04 18:17:37 +02:00
integration Refresh worktrees before auto-forwarding branches 2026-05-21 13:59:18 +02:00
jsonschema Modernize all codes 2025-11-15 10:46:23 +01:00
logs Fix linter warnings about ignoring errors from bufio.Scanner 2026-05-03 16:57:24 +02:00
snake Enable intrange linter, and fix warnings 2025-06-30 18:30:11 +02:00
tasks Fix linter warnings about ignoring errors from bufio.Scanner 2026-05-03 16:57:24 +02:00
theme Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
updates Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
utils Make UnixToDateSmart timezone-deterministic 2026-05-02 17:59:27 +02:00