Skip to content

Commit

Permalink
merge: Dummy determination of conflict marker size
Browse files Browse the repository at this point in the history
  • Loading branch information
rwe committed Feb 6, 2022
1 parent 8aaede2 commit 3f2927c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gitrevise/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]}",
Expand Down

0 comments on commit 3f2927c

Please sign in to comment.