From 9974e290e7c207de569ee24356253a69e5955e67 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sat, 3 Apr 2010 14:52:17 -0500 Subject: Teach mailinfo %< as an alternative scissors mark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index ce2ef6b..4a9729b 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -746,7 +746,8 @@ static int is_scissors_line(const struct strbuf *line) continue; } if (i + 1 < len && - (!memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2))) { + (!memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2) || + !memcmp(buf + i, ">%", 2) || !memcmp(buf + i, "%<", 2))) { in_perforation = 1; perforation += 2; scissors += 2; -- cgit v0.10.2-6-g49f6