lazygit/pkg/commands
Stefan Haller 4cd15a36e3 Fix custom patch operations on added files
Several custom patch commands on parts of an added file would fail with the
confusing error message "error: new file XXX depends on old contents". These
were dropping the custom patch from the original commit, moving the patch to a
new commit, moving it to a later commit, or moving it to the index.

We fix this by converting the patch header from an added file to a diff against
an empty file. We do this not just for the purpose of applying the patch, but
also for rendering it and copying it to the clip board. I'm not sure it matters
much in these cases, but it does feel more correct for a filtered patch to be
presented this way.
2024-06-23 12:40:31 +02:00
..
git_commands Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
git_config Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
hosting_service Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
models Show divergence from base branch in branches list 2024-06-03 13:59:43 +02:00
oscommands Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
patch Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
testdata
types/enums Show mode-specific keybinding suggestions 2024-01-28 08:33:13 +11:00
git.go Add ahead/behind information for @{push} 2024-05-19 09:44:38 +02:00
git_cmd_obj_builder.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
git_cmd_obj_runner.go Retry on index.lock error 2023-07-10 19:13:18 +10:00