mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-15 10:06:26 -04:00
When the linked worktree's branch is changed externally — by another shell, by another tool, or by git running outside lazygit — lazygit's worktrees model goes stale. The next post-fetch auto-forward then doesn't realise the branch is now checked out elsewhere, and advances its ref behind the worktree's back. The worktree's HEAD then resolves to a commit its index/working tree haven't been updated to, and the user sees that diff as the inverse of what was fetched — files appearing as pending changes that they didn't make. The test sets up a linked worktree initially on a side branch, then externally checks out master in it before pressing fetch. Two EXPECTED/ACTUAL pairs capture the symptoms: the branches view shows master as `✓` rather than `↓1`, and switching to the linked worktree shows master's would-be incoming file as a pending deletion against HEAD. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fetch_and_auto_forward_branches_all_branches.go | ||
| fetch_and_auto_forward_branches_all_branches_checked_out_in_other_worktree.go | ||
| fetch_and_auto_forward_branches_none.go | ||
| fetch_and_auto_forward_branches_only_main_branches.go | ||
| fetch_and_auto_forward_branches_worktree_added_after_startup.go | ||
| fetch_prune.go | ||
| fetch_when_sorted_by_date.go | ||
| force_push.go | ||
| force_push_multiple_matching.go | ||
| force_push_multiple_upstream.go | ||
| force_push_remote_branch_not_stored_locally.go | ||
| force_push_triangular.go | ||
| pull.go | ||
| pull_and_set_upstream.go | ||
| pull_merge.go | ||
| pull_merge_conflict.go | ||
| pull_rebase.go | ||
| pull_rebase_conflict.go | ||
| pull_rebase_interactive_conflict.go | ||
| pull_rebase_interactive_conflict_drop.go | ||
| push.go | ||
| push_and_auto_set_upstream.go | ||
| push_and_set_upstream.go | ||
| push_follow_tags.go | ||
| push_no_follow_tags.go | ||
| push_tag.go | ||
| push_with_credential_prompt.go | ||
| rename_branch_and_pull.go | ||
| shared.go | ||