summaryrefslogtreecommitdiff
path: root/ll-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-17 07:28:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-17 10:01:43 (GMT)
commit8588567c96490b8d236b1bc13f9bcb0dfa118efe (patch)
tree5c5f026346ef69293b14419028f15ecf39d5701d /ll-merge.c
parent191f24171718e894cb5ba806bc45861ebac95e96 (diff)
downloadgit-8588567c96490b8d236b1bc13f9bcb0dfa118efe.zip
git-8588567c96490b8d236b1bc13f9bcb0dfa118efe.tar.gz
git-8588567c96490b8d236b1bc13f9bcb0dfa118efe.tar.bz2
rerere: honor conflict-marker-size attribute
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'll-merge.c')
-rw-r--r--ll-merge.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ll-merge.c b/ll-merge.c
index d682071..0dcaae0 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;
+}