From 8588567c96490b8d236b1bc13f9bcb0dfa118efe Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Jan 2010 23:28:46 -0800 Subject: rerere: honor conflict-marker-size attribute Signed-off-by: Junio C Hamano --- ll-merge.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'll-merge.c') diff --git a/ll-merge.c b/ll-merge.c index d6820714d..0dcaae0dd 100644 --- a/ll-merge.c +++ b/ll-merge.c @@ -380,3 +380,18 @@ int ll_merge(mmbuffer_t *result_buf, ours, our_label, theirs, their_label, virtual_ancestor, marker_size); } + +int ll_merge_marker_size(const char *path) +{ + static struct git_attr_check check; + int marker_size = DEFAULT_CONFLICT_MARKER_SIZE; + + if (!check.attr) + check.attr = git_attr("conflict-marker-size"); + if (!git_checkattr(path, 1, &check) && check.value) { + marker_size = atoi(check.value); + if (marker_size <= 0) + marker_size = DEFAULT_CONFLICT_MARKER_SIZE; + } + return marker_size; +} -- cgit v1.2.1