mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-29 18:24:21 -05:00
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.