@matheusbsbs / matheus-bagliano / commits / 9974e290e7
Fork 0

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 <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Apr 3, 2010 at 14:52 UTC 9974e290e7c207de569ee24356253a69e5955e67
1 file changed +2 -1
builtin/mailinfo.c
+2 -1
@@ -746,7 +746,8 @@ static int is_scissors_line(const struct strbuf *line)
746 continue;
747 }
748 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))) {
751 in_perforation = 1;
752 perforation += 2;
753 scissors += 2;