summaryrefslogtreecommitdiff
path: root/builtin/mailinfo.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-04-03 19:52:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-04 17:17:55 (GMT)
commit9974e290e7c207de569ee24356253a69e5955e67 (patch)
treea2a58cbc900e1997434bf49551db8224fbef5b9e /builtin/mailinfo.c
parent6555b196f00128f13ab8f719ee1e156238f16bb3 (diff)
downloadgit-9974e290e7c207de569ee24356253a69e5955e67.zip
git-9974e290e7c207de569ee24356253a69e5955e67.tar.gz
git-9974e290e7c207de569ee24356253a69e5955e67.tar.bz2
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>
Diffstat (limited to 'builtin/mailinfo.c')
-rw-r--r--builtin/mailinfo.c3
1 files changed, 2 insertions, 1 deletions
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;