rerere: honor conflict-marker-size attribute
[gitweb.git] / rerere.c
index 5f332cb25c240d9a26ec48bd3daa36ae1ced9d7c..b988b467fa06d109d8164bccf213a362e87fb1d4 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -5,6 +5,7 @@
 #include "dir.h"
 #include "resolve-undo.h"
 #include "ll-merge.h"
+#include "attr.h"
 
 /* if rerere_enabled == -1, fall back to detection of .git/rr-cache */
 static int rerere_enabled = -1;
@@ -221,7 +222,7 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
 {
        int hunk_no = 0;
        struct rerere_io_file io;
-       int marker_size = 7;
+       int marker_size = ll_merge_marker_size(path);
 
        memset(&io, 0, sizeof(io));
        io.io.getline = rerere_file_getline;
@@ -288,7 +289,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
        struct cache_entry *ce;
        int pos, len, i, hunk_no;
        struct rerere_io_mem io;
-       int marker_size = 7;
+       int marker_size = ll_merge_marker_size(path);
 
        /*
         * Reproduce the conflicted merge in-core