jesseduffield.lazygit/pkg/commands
Stefan Haller 5481436d8c Honor the conflict-marker-size gitattribute
Ask git for the attribute of every conflicted file whenever we load the
file status, so that we recognize the markers it actually wrote. Files
that are set up this way are precisely the ones whose regular content
tends to contain marker-looking lines, so matching a run of at least
seven characters instead is not an option: we'd take the file's own
content for markers and then never consider its conflicts resolved.

One `git check-attr` call covers all conflicted files at once; asking per
file would take seconds when hundreds of files are conflicted, and it
would hurt worst on Windows, where spawning a process is expensive.
Because the lookup rides along with the file status, it costs nothing
when there are no conflicts, and editing .gitattributes during a merge
takes effect on the next refresh.
2026-08-08 12:43:42 +02:00
..
direnv Offer direnv .envrc approval from inside lazygit 2026-06-04 09:05:01 +02:00
git_commands Honor the conflict-marker-size gitattribute 2026-08-08 12:43:42 +02:00
git_config Pin the cached git config's commands to the repo directory 2026-07-20 17:07:39 +02:00
hosting_service Optimize regex compilations 2026-05-10 15:28:14 +02:00
models Make the conflict marker size a parameter of our marker matching 2026-08-08 12:43:42 +02:00
oscommands Start all commands of a pipeline before waiting for any of them 2026-08-06 14:34:47 +02:00
patch Guard the patch builder against concurrent access 2026-07-17 12:35:54 +02:00
testdata Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
git.go Tell git where the repo is when it can't find it itself 2026-08-08 11:15:01 +02:00
git_cmd_obj_builder.go Tell git where the repo is when it can't find it itself 2026-08-08 11:15:01 +02:00
git_cmd_obj_builder_test.go Tell git where the repo is when it can't find it itself 2026-08-08 11:15:01 +02:00
git_cmd_obj_runner.go Back off exponentially between lock-error retries 2026-07-15 10:08:44 +02:00
git_cmd_obj_runner_test.go Back off exponentially between lock-error retries 2026-07-15 10:08:44 +02:00