Commit graph

19 commits

Author SHA1 Message Date
Stefan Haller bc9fafff02 Make the conflict marker size a parameter of our marker matching
Git doesn't always write conflict markers of seven characters: the
conflict-marker-size gitattribute overrides that per file, and it is set
for good reasons — for file types whose regular content tends to contain
marker-looking lines, such as documentation about merging, or test
scripts. We hard-code seven characters everywhere we look for markers,
so none of that works.

Prepare for honoring the attribute by threading the marker size through
everything that recognizes a marker, carried on the file model. Nothing
fills it in yet, so we still use git's default size of seven everywhere,
and matching is unchanged: a marker consists of exactly that many marker
characters, and all but the "=======" one are followed by a space and a
label.
2026-08-08 12:43:42 +02:00
Stefan Haller b97dd6bc3f Remove utils.Clamp, use lo.Clamp instead 2025-04-21 18:03:18 +02:00
Jesse Duffield dd1bf629b8 migrate patch building tests 2023-02-25 21:37:16 +11:00
Jesse Duffield 7410acd1aa move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
Jesse Duffield 3bf0c9ef44 more documentation 2022-05-07 16:02:04 +10:00
Ryooooooga 3b5a019e1a feat(merge_panel): Add open/edit files in merge conflict panel 2022-04-06 08:27:03 +10:00
Jesse Duffield a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Jesse Duffield c084abb378 move more view model logic into the files view model 2022-03-17 19:13:40 +11:00
Jesse Duffield 84a1992055 better locking of merge panel state 2022-01-27 21:25:04 +11:00
Jesse Duffield c8cc18920f improve merge conflict flow 2022-01-26 14:50:47 +11:00
Jesse Duffield f08fdb2873 Minor refactor 2021-08-25 22:23:55 +10:00
Ryooooooga 6ca42ff720 Fix pick all hunks 2021-08-25 22:23:55 +10:00
Ryooooooga a533f8e1a5 simplify merge panel logic 2021-08-25 22:23:55 +10:00
Ryooooooga cf8ded0b79 add mergeConflict#hasAncestor 2021-08-25 22:23:55 +10:00
Ryooooooga 73548fa15f Fix conflict resolution 2021-08-25 22:23:55 +10:00
Ryooooooga a0e7604f61 Support git config merge.conflictStyle diff3 2021-08-25 22:23:55 +10:00
Jesse Duffield 258eedb38c refactor 2021-06-02 20:33:52 +10:00
Harrison Jones e478c254d4 Handle alternate merge conflict format; add tests 2021-05-30 13:50:42 +10:00
Jesse Duffield 98375dc902 refactor merge panel 2021-04-18 18:58:09 +10:00