jesseduffield.lazygit/pkg
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
..
app Bump minimum required git version to 2.20 2023-02-19 10:20:14 +01:00
cheatsheet integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
commands Use forward patches and --reverse flag for partial patches too 2023-03-07 09:49:34 +01:00
common introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
config generated cheatsheets and ran code formatting 2023-03-05 07:06:34 +05:00
constants update release notes 2021-04-20 18:34:47 +10:00
env clearer separation of concerns when bootstrapping application 2022-05-07 16:02:04 +10:00
fakes cleanup integration test code 2023-02-26 12:54:13 +11:00
gui Use forward patches and --reverse flag for partial patches too 2023-03-07 09:49:34 +01:00
i18n mention path in tooltips 2023-02-20 19:28:45 +11:00
integration Fix opening the current test file from the integration test gui 2023-03-07 09:49:34 +01:00
logs clearer separation of concerns when bootstrapping application 2022-05-07 16:02:04 +10:00
secureexec Format code to pass lint 2021-09-16 21:38:43 +08:00
snake integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
tasks add deadlock mutex package 2022-08-07 11:16:14 +10:00
theme Fix setting gui.selectedRangeBgColor as a hex value 2023-03-03 08:46:43 +01:00
updates pkg/updates: Fix resource availability check in Updater 2022-03-18 22:19:45 +11:00
utils fix: fix ReplacePlaceholderString 2023-01-18 20:56:22 +09:00