diff options
-rw-r--r-- | rerere.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -359,6 +359,18 @@ static int rerere_file_getline(struct strbuf *sb, struct rerere_io *io_) return strbuf_getwholeline(sb, io->input, '\n'); } +static int is_temporary_branch_mark(char *buf) +{ + const char *name; + + if (!skip_prefix(buf, " Temporary merge branch ", &name)) + return 0; + if (*name != '1' && *name != '2') + return 0; + name++; + return (!*name || (*name == '\n')); +} + /* * Require the exact number of conflict marker letters, no more, no * less, followed by SP or any whitespace @@ -381,7 +393,7 @@ static int is_cmarker(char *buf, int marker_char, int marker_size) while (marker_size--) if (*buf++ != marker_char) return 0; - if (want_sp && *buf != ' ') + if (want_sp && (*buf != ' ' || is_temporary_branch_mark(buf))) return 0; return isspace(*buf); } |