diff --git a/gitrevise/merge.py b/gitrevise/merge.py index 131ed19..fb820a4 100644 --- a/gitrevise/merge.py +++ b/gitrevise/merge.py @@ -30,6 +30,12 @@ DEFAULT_CONFLICT_MARKER_SIZE = 7 +def get_conflict_marker_size(__repo: Repository, __file: Path) -> int: + # TODO: Determine on a per-file basis by its `conflict-marker-size` attribute. + # See ll_merge_marker_size in git/ll-merge.c + return DEFAULT_CONFLICT_MARKER_SIZE + + class MergeConflict(Exception): pass @@ -207,7 +213,7 @@ def merge_blobs( tmpdir = repo.get_tempdir() - marker_size = DEFAULT_CONFLICT_MARKER_SIZE + marker_size = get_conflict_marker_size(repo, path) annotated_labels = ( f"{path} (new parent): {labels[0]}",