1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-12 04:23:03 +02:00
lazygit/pkg/gui
Stefan Haller 9cc33c479b Use forward patches and --reverse flag for partial patches too
There's no reason to have two different ways of applying patches for whole-file
patches and partial patches; use --reverse for both. Not only does this simplify
the code a bit, but it fixes an actual problem: when reverseOnGenerate and
keepOriginalHeader are both true, the generated patch header is broken (the two
blobs in the line `index 6d1959b..6dc5f84 100644` are swapped). Git fails to do
a proper three-way merge in that case, as it expects the first of the two blobs
to be the common ancestor.

It would be possible to fix this by extending ModifiedPatchForLines to swap the
two blobs in this case; but this would prevent us from concatenating all patches
and apply them in one go, which we are going to do later in the branch.
2023-03-07 09:49:34 +01:00
..
context feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
controllers Bundle the reverse and keepOriginalHeader flags into a PatchOptions struct 2023-03-07 09:49:34 +01:00
filetree fix could-not-access error 2022-11-12 18:09:15 -03:30
keybindings feat: allow null in keybindings 2022-10-18 22:20:03 +09:00
mergeconflicts migrate patch building tests 2023-02-25 21:37:16 +11:00
modes introduce Ref interface 2022-04-02 17:04:42 +11:00
patch_exploring refactor to only have one context per view 2022-08-06 13:49:11 +10:00
popup fix: fix goroutine leaks 2023-01-06 10:51:09 +09:00
presentation Don't put "<--- YOU ARE HERE" in the commit model's name 2023-03-01 09:12:00 +01:00
services/custom_commands Resolve the prompt just before using it 2022-11-25 22:46:36 +01:00
style fix: fix default color to be white 2023-02-03 23:36:59 +09:00
types Merge pull request #2433 from Ryooooooga/subcommits-limit 2023-03-06 18:22:57 +11:00
app_status_manager.go [#2258] show bottom line when having status 2022-11-14 00:53:55 +03:00
arrangement.go [#2258] hide options panel when showBottom line is disabled 2022-11-14 01:04:56 +03:00
background.go move background code into its own file 2022-12-24 19:14:52 +11:00
branches_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
command_log_panel.go rename key to Pull 2023-02-19 11:42:00 +11:00
commit_files_panel.go Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
commit_message_panel.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
commits_panel.go Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
confirmation_panel.go chore: change to work return-alt1 on all views 2023-02-11 21:19:47 +09:00
context_config.go integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
context.go Keep side context in context stack when pushing a main context 2023-03-04 15:07:48 +01:00
controllers.go feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
custom_patch_options_panel.go Fixed breaking integrtion tests(old) 2023-01-29 10:03:59 +05:30
diff_context_size_test.go move context keys into context package 2022-03-17 19:13:40 +11:00
diffing.go Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
dummies.go feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
editors.go feat(editors.go): move by words 2022-10-05 22:29:55 +09:00
extras_panel.go rename displayString to label for menu items 2022-05-08 14:26:18 +10:00
file_watching.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
files_panel.go fix: fix initial origin of commit message panel 2022-10-15 20:09:23 +09:00
filtering_menu_panel.go rename displayString to label for menu items 2022-05-08 14:26:18 +10:00
filtering.go pkg/gui: Rename IPopupHandler::Ask() to Confirm() 2022-03-30 20:13:43 +11:00
global_handlers.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
gui_common.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
gui_driver.go Improve staging panel integration tests 2023-02-25 11:35:41 +11:00
gui.go feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
information_panel.go fix: fix collision of Donate and Ask Question 2022-05-07 18:02:09 +09:00
keybindings.go remove x keybinding for opening menu so we now only use '?' 2023-02-20 19:28:45 +11:00
layout.go chore: remove UNKNOWN_VIEW_ERROR_MSG 2023-02-10 21:26:51 +09:00
list_context_config.go Merge pull request #2433 from Ryooooooga/subcommits-limit 2023-03-06 18:22:57 +11:00
main_panels.go fix glitchy render of stale data when flicking through files and directories 2022-10-02 20:41:24 -07:00
menu_panel.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
modes.go add integration tests for cherry picking 2022-09-16 22:15:16 -07:00
options_menu_panel.go fix: disable menu key binding while displaying popup 2023-02-09 20:13:41 +09:00
pty_windows.go Format code to pass lint 2021-09-16 21:38:43 +08:00
pty.go use ptmx map so that we can have multiple ptmx's stored for resizing 2022-08-06 13:49:11 +10:00
quitting.go pkg/gui: Rename IPopupHandler::Ask() to Confirm() 2022-03-30 20:13:43 +11:00
recent_repos_panel.go remove deprecated calls 2022-09-17 15:10:41 -07:00
reflog_panel.go Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
refresh.go Use forward patches and --reverse flag for partial patches too 2023-03-07 09:49:34 +01:00
remote_branches_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
remotes_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
searching.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
side_window.go refactor to only have one context per view 2022-08-06 13:49:11 +10:00
snake.go integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
stash_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
status_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
sub_commits_panel.go feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
submodules_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
suggestions_panel.go refactor contexts 2022-03-17 19:13:40 +11:00
tags_panel.go allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
tasks_adapter.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
test_mode.go don't kill long-running sandbox sessions 2022-12-21 22:51:39 +11:00
updates.go move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
view_helpers.go remove x keybinding for opening menu so we now only use '?' 2023-02-20 19:28:45 +11:00
views.go Turn highlighting off in staging/stagingSecondary views 2023-02-15 21:29:38 +01:00
whitespace-toggle.go Better redrawing after toggling "ignore whitespace" 2023-02-07 12:09:17 +01:00
window.go appease linter 2022-12-30 12:18:59 +11:00