summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-07-31 05:56:03 -0700
committerJunio C Hamano <gitster@pobox.com>2026-07-31 08:52:15 -0700
commite28c701fe41825013220e1b9fefe8da038070aa2 (patch)
tree13a7228133a574db6f3c2a3255523aeade14738d /t/t4013/diff.diff_initial..side
parent341e32111cc0bbf2542fbd8e604b5ed5187c3f98 (diff)
merge-ll: consolidate conflict marker scanning logic
The diff.c:is_conflict_marker() and rerere.c:is_cmarker() functions implement duplicate logic for identifying conflict marker lines (lines that begin with a run of '<', '=', '>', and '|' characters). diff.c's original version from 049540435f (diff --check: detect leftover conflict markers, 2008-06-26) accepts any whitespace (such as a newline) immediately following '<<<<<<<' and '>>>>>>>', whereas rerere.c's version from 191f241717 (rerere: prepare for customizable conflict marker length, 2010-01-16) strictly requires a space character (' ') after them. Implement is_conflict_marker_line() in merge-ll.c to serve as a replacement for both, and update diff.c and rerere.c to use the new helper. The unified helper intentionally adopts rerere's stricter rule, as the conflicts generated by Git always show the "ours" and "theirs" labels after these markers separated by a space. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions