Skip to content

Commit 9974e29

Browse files
jrngitster
authored andcommitted
Teach mailinfo %< as an alternative scissors mark
Handle perforations found “in the wild” more robustly by recognizing “%<” as an alternative scissors mark. This feature is only meant to support old habits. Discourage new use of the percent-based version by only documenting the 8< symbol so new users’ perforations can still be recognized by old versions of Git. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6555b19 commit 9974e29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/mailinfo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ static int is_scissors_line(const struct strbuf *line)
746746
continue;
747747
}
748748
if (i + 1 < len &&
749-
(!memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2))) {
749+
(!memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2) ||
750+
!memcmp(buf + i, ">%", 2) || !memcmp(buf + i, "%<", 2))) {
750751
in_perforation = 1;
751752
perforation += 2;
752753
scissors += 2;

0 commit comments

Comments
 (0)