1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-02 09:21:40 +02:00
lazygit/pkg/gui/controllers
Jesse Duffield b61ca21a84 Allow checking for merge conflicts after running a custom command
We have a use-case to rebind 'm' to the merge action in the branches panel. There's three ways to handle this:
1) For all global keybindings, define a per-panel key that invokes it
2) Give a name to all controller actions and allow them to be invoked in custom commands
3) Allow checking for merge conflicts after running a custom command so that users can add their own 'git merge' custom command
that matches the in-built action

Option 1 is hairy, Option 2 though good for users introduces new backwards compatibility issues that I don't want to do
right now, and option 3 is trivially easy to implement so that's what I'm doing.

I've put this under an 'after' key so that we can add more things later. I'm imagining other things like being able to
move the cursor to a newly added item etc.

I considered always running this hook by default but I'd rather not: it's matching on the output text and I'd rather something
like that be explicitly opted-into to avoid cases where we erroneously believe that there are conflicts.
2023-07-13 18:40:34 +10:00
..
helpers Allow checking for merge conflicts after running a custom command 2023-07-13 18:40:34 +10:00
attach.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
base_controller.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
basic_commits_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
bisect_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
branches_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
command_log_controller.go lots of changes 2023-04-30 13:19:53 +10:00
commit_description_controller.go Split commit message panel into commit summary and commit description panel 2023-04-30 13:19:53 +10:00
commit_message_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
commits_files_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
common.go lots of changes 2023-04-30 13:19:53 +10:00
confirmation_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
context_lines_controller.go lots of changes 2023-04-30 13:19:53 +10:00
custom_command_action.go move custom command action into its own file 2023-04-30 13:19:53 +10:00
custom_patch_options_menu_action.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
diffing_menu_action.go fix: typo EnteRefName 2023-06-28 18:54:21 +06:00
files_controller.go Replace uses of "git stash save" with "git stash push" 2023-07-10 15:09:17 +02:00
files_remove_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
filter_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
filtering_menu_action.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
git_flow_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
global_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
jump_to_side_window_controller.go move side window actions to controllers package 2023-04-30 13:19:53 +10:00
list_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
local_commits_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
menu_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
merge_conflicts_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
options_menu_action.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
patch_building_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
patch_explorer_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
quit_actions.go Cancel filter/search when hitting escape 2023-07-03 12:54:13 +10:00
reflog_commits_controller.go lots of changes 2023-04-30 13:19:53 +10:00
remote_branches_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
remotes_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
screen_mode_actions.go move more actions into controller 2023-04-30 13:19:53 +10:00
search_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
search_prompt_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
side_window_controller.go move side window actions to controllers package 2023-04-30 13:19:53 +10:00
snake_controller.go lots of changes 2023-04-30 13:19:53 +10:00
staging_controller.go Rename "Delete change" menu entry to "Discard change" in staging panel 2023-06-26 08:19:58 +02:00
stash_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
status_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
sub_commits_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
submodules_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
suggestions_controller.go lots of changes 2023-04-30 13:19:53 +10:00
switch_to_diff_files_controller.go Use searching, not filtering, in file tree views 2023-07-03 12:54:14 +10:00
switch_to_sub_commits_controller.go Only cancel search if main or temporary context loses focus 2023-07-03 12:54:14 +10:00
sync_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
tags_controller.go Use an interface for tasks instead of a concrete struct 2023-07-10 17:12:21 +10:00
toggle_whitespace_action.go Remove the toast when toggling "ignore whitespace" 2023-05-20 12:58:32 +10:00
types.go introduce Ref interface 2022-04-02 17:04:42 +11:00
undo_controller.go Replace uses of "git stash save" with "git stash push" 2023-07-10 15:09:17 +02:00
vertical_scroll_controller.go lots of changes 2023-04-30 13:19:53 +10:00
workspace_reset_controller.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00