jesseduffield.lazygit/pkg/commands
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
..
git_commands Don't put "<--- YOU ARE HERE" in the commit model's name 2023-03-01 09:12:00 +01:00
git_config remove deprecated calls 2022-09-17 15:10:41 -07:00
hosting_service cleanup integration test code 2023-02-26 12:54:13 +11:00
models show tag message 2023-02-20 19:01:08 +11:00
oscommands Add credential prompts for U2F-backed SSH keys 2022-11-30 13:34:32 +11:00
patch Remove the keepOriginalHeader retry loop 2023-03-07 09:49:34 +01:00
testdata Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
types/enums more refactoring 2022-01-04 09:07:15 +11:00
git.go Revert "fix: improve backward compatibility" 2023-02-19 16:13:31 +01:00
git_cmd_obj_builder.go WIP 2022-01-04 09:07:15 +11:00
git_cmd_obj_runner.go fix(loaders/file.go): changed to ignore stderr when loading git status 2022-09-19 18:46:32 +09:00
git_test.go feat: add GitVersion struct 2022-12-30 20:01:14 +09:00