jesseduffield.lazygit/pkg/integration/tests/conflicts
Stefan Haller ad507d67f4 Only prompt to continue a rebase/merge if we started it
When conflicts of an in-progress rebase/merge/cherry-pick/revert are
resolved, lazygit pops up a prompt offering to continue it. This is
helpful when you started the operation in lazygit and resolved the
conflicts in your editor. But it's confusing when the operation was
started outside lazygit — e.g. by a coding agent in another terminal
that resolves the conflicts but hasn't continued yet because it's still
running tests or fixing the build. lazygit would then prompt unbidden.

Track whether the in-progress operation was started from within lazygit,
and only show the prompt in that case. We record this right after running
a merge/rebase step (in CheckMergeOrRebaseWithRefreshOptions, the
subprocess branch of genericMergeCommand, and the custom-command
conflict path), and clear it whenever a refresh observes that no
operation is in progress — which also handles an operation that was
finished or aborted externally.

The conflict-resolution tests start their operation by running git
directly (not through lazygit's UI), so they call the new test helper
Common.PretendMergeOrRebaseStartedInLazygit to have lazygit treat the
operation as its own and still get the prompt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 18:28:07 +02:00
..
filter.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
merge_file_both.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
merge_file_current.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
merge_file_incoming.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
pick_both_hunks_diff3.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
resolve_externally.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
resolve_externally_started_merge_no_prompt.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
resolve_multiple_files.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
resolve_no_auto_stage.go Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
resolve_non_textual_conflicts.go Provide conflict resolution dialogs for non-textual conflicts 2025-04-09 10:27:57 +02:00
resolve_without_trailing_lf.go Only prompt to continue a rebase/merge if we started it 2026-07-03 18:28:07 +02:00
space_on_non_textual_conflict.go Route space to the conflict picker for non-textual conflicts 2026-06-28 16:12:36 +02:00
undo_choose_hunk.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00