jesseduffield.lazygit/pkg
Stefan Haller 5d692e8961 Remove the keepOriginalHeader retry loop
The loop is pointless for two reasons:
- git apply --3way has this fallback built in already. If it can't do a
  three-way merge, it will fall back to applying the patch normally.
- However, the only situation where it does this is when it can't do a 3-way
  merge at all because it can't find the necessary ancestor blob. This can only
  happen if you transfer a patch between different repos that don't have the
  same blobs available; we are applying the patch to the same repo that is was
  just generated from, so a 3-way merge is always possible. (Now that we fixed
  the bug in the previous commit, that is.)

But the retry loop is not only pointless, it was actually harmful, because when
a 3-way patch fails with a conflict, git will put conflict markers in the
patched file and then exit with a non-zero exit status. So the retry loop would
try to patch the already patched file again, and this almost certainly fails,
but with a cryptic error message such as "error: main.go: does not exist in
index".
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 Remove the keepOriginalHeader retry loop 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