jesseduffield.lazygit/pkg/integration/tests/sync
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
..
fetch_and_auto_forward_branches_all_branches.go Fix more unstable tests 2025-07-10 08:59:01 +02:00
fetch_and_auto_forward_branches_all_branches_checked_out_in_other_worktree.go Show worktree name next to branch in branches list 2026-03-09 11:34:34 +01:00
fetch_and_auto_forward_branches_none.go Fix more unstable tests 2025-07-10 08:59:01 +02:00
fetch_and_auto_forward_branches_only_main_branches.go Fix more unstable tests 2025-07-10 08:59:01 +02:00
fetch_and_auto_forward_branches_worktree_added_after_startup.go Refresh worktrees before auto-forwarding branches 2026-05-21 13:59:18 +02:00
fetch_prune.go Fix typos 2025-01-03 10:50:36 +11:00
fetch_when_sorted_by_date.go Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00
force_push.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
force_push_multiple_matching.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
force_push_multiple_upstream.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
force_push_remote_branch_not_stored_locally.go Add integration test for pushing when the remote is not stored locally 2024-06-01 08:12:45 +02:00
force_push_triangular.go Remove obsolete git version restriction in test 2025-07-09 11:15:45 +02:00
pull.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
pull_and_set_upstream.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
pull_merge.go Remove ColoredBranchStatus and branchStatusColor 2024-06-03 13:02:46 +02:00
pull_merge_conflict.go Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
pull_rebase.go Remove ColoredBranchStatus and branchStatusColor 2024-06-03 13:02:46 +02:00
pull_rebase_conflict.go Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
pull_rebase_interactive_conflict.go Add section headers for rebase todos, cherry-picks, reverts, and actual commits 2025-04-20 16:06:15 +02:00
pull_rebase_interactive_conflict_drop.go Add section headers for rebase todos, cherry-picks, reverts, and actual commits 2025-04-20 16:06:15 +02:00
push.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
push_and_auto_set_upstream.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
push_and_set_upstream.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
push_follow_tags.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
push_no_follow_tags.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
push_tag.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
push_with_credential_prompt.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00
rename_branch_and_pull.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
shared.go More explicit test of status panel content 2024-06-03 13:02:46 +02:00