1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-10 04:07:18 +02:00
lazygit/pkg/gui/controllers
Stefan Haller 843e12286f Improve prompts when amending commits
This fixes two minor problems with the prompts:

1. When pressing shift-A in the local commits view, it would first prompt
   whether to stage all files, and then it would prompt whether to amend the
   commit at all. This doesn't make sense, it needs to be the other way round.

2. When pressing shift-A on the head commit in an interactive rebase, we would
   ask whether they want to amend the last commit, like when pressing shift-A in
   the files view. While this is technically correct, the fact that we're
   amending the head commit in this case is just an implementation detail, and
   from the user's point of view it's better to use the same prompt as we do for
   any other commit.

To fix these, we remove the confirmation panel from AmendHelper.AmendHead() and
instead add it at the two call sites, so that we have more control over this.
2023-09-01 18:55:16 +02:00
..
helpers Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
attach.go
base_controller.go
basic_commits_controller.go
bisect_controller.go
branches_controller.go Add "Show divergence from upstream" entry to Upstream menu in branches panel 2023-08-29 08:16:40 +02:00
command_log_controller.go
commit_description_controller.go Add key binding for switching from the commit message panel to an editor 2023-08-21 10:03:34 +02:00
commit_message_controller.go Add key binding for switching from the commit message panel to an editor 2023-08-21 10:03:34 +02:00
commits_files_controller.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
common.go
confirmation_controller.go
context_lines_controller.go
custom_command_action.go
custom_patch_options_menu_action.go
diffing_menu_action.go
files_controller.go Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
files_remove_controller.go Support custom keybindings for confirm discard 2023-08-25 08:50:05 -05:00
filter_controller.go
filtering_menu_action.go
git_flow_controller.go
global_controller.go
jump_to_side_window_controller.go
list_controller.go Add a mechanism to insert non-model items into list contexts 2023-08-29 08:04:47 +02:00
local_commits_controller.go Improve prompts when amending commits 2023-09-01 18:55:16 +02:00
menu_controller.go Fix escape not cancelling filter mode, but closing the menu instead 2023-08-30 22:37:13 +02:00
merge_conflicts_controller.go Moves log related translations into its own Tr.Log. namespace 2023-07-31 19:42:41 -04:00
options_menu_action.go Add sections (local, global) to the keybindings menu 2023-08-29 08:04:47 +02:00
patch_building_controller.go
patch_explorer_controller.go Pass UserConfig to checkScrollUp/Down instead of just the scrollOffMargin 2023-08-21 08:10:28 +02:00
quit_actions.go
reflog_commits_controller.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
remote_branches_controller.go Allow deleting remote tags/branches from local tag/branch views (#2738) 2023-08-10 17:39:26 +10:00
remotes_controller.go
screen_mode_actions.go
scroll_off_margin_test.go Add tests for scroll-off margin of zero 2023-08-21 08:10:28 +02:00
scroll_off_margin.go Add scrollOffEnabled config 2023-08-21 09:03:45 +02:00
search_controller.go
search_prompt_controller.go
side_window_controller.go
snake_controller.go
staging_controller.go
stash_controller.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
status_controller.go
sub_commits_controller.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
submodules_controller.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
suggestions_controller.go
switch_to_diff_files_controller.go
switch_to_sub_commits_controller.go Add "Show divergence from upstream" entry to Upstream menu in branches panel 2023-08-29 08:16:40 +02:00
sync_controller.go Show correct keybindings in force-push prompt 2023-07-31 11:38:52 +02:00
tags_controller.go Allow deleting remote tags/branches from local tag/branch views (#2738) 2023-08-10 17:39:26 +10:00
toggle_whitespace_action.go Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
types.go
undo_controller.go
vertical_scroll_controller.go
workspace_reset_controller.go Reset origin when clearing view 2023-08-08 22:01:43 +10:00
worktree_options_controller.go
worktrees_controller.go