Skip to contentSkip to conversation

Majorly simplify the definition of scissors line

PATCH New しらいし ななこ 1 participant 1 message Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Majorly simplify the definition of scissors line

The definition of scissors line was "a line that mainly consists of scissors and perforation". While it is easy to explain to new people, this does not exactly define where the line between "mainly consists of" and "contains some amount of" lies.

Make the definition more strict and allow only lines that begin with a '-- >8 --' (or its left-handed equivalent '-- 8< --'), which is equally easy to explain to new people. More important, the rule is much shorter and more precise, so it is easier to remember.

This pattern also is how Nicolas Sebrecht initially thought what the definition was, without reading what Junio's code really did, so we have an empirical evidence that this matches at least one newcomer's intuition.

---
 Documentation/git-mailinfo.txt |    4 +-
 builtin-mailinfo.c             |   48 +++------------------------------------
 t/t5100/msg0014                |    4 +-
 t/t5100/sample.mbox            |    4 +-
 4 files changed, 10 insertions(+), 50 deletions(-)
Documentation/git-mailinfo.txt +2 -2
index 71b93ad..1c2c414 100644
@@ -56,8 +56,8 @@ conversion, even with this flag.
 
 --scissors::
 	Remove everything in body before a scissors line.  A line that
-	mainly consists of scissors (either ">8" or "8<") and perforation
-	(dash "-") marks is called a scissors line, and is used to request
+	begins with "-- >8 --" or "-- 8< --" is called a scissors line,
+	and is used to request
 	the reader to cut the message at that line.  If such a line
 	appears in the body of the message before the patch, everything
 	before it (including the scissors line itself) is ignored when
builtin-mailinfo.c +4 -44

56 lines not on this page · raw message

t/t5100/msg0014 +2 -2
index 62e5cd2..187ff57 100644
@@ -6,8 +6,8 @@ Subject: [PATCH] BLAH TWO
 
 And then we will see the scissors.
 
- This line is not a scissors mark -- >8 -- but talks about it.
- - - >8 - - please remove everything above this line - - >8 - -
+ This is not a scissors line -- >8 -- but talks about it.
+-- >8 -- please remove everything above this line -- >8 --
 
 Subject: [PATCH] Teach mailinfo to ignore everything before -- >8 -- mark
 From: Junio C Hamano <[email protected]>
t/t5100/sample.mbox +2 -2
index 13fa4ae..563f713 100644
@@ -576,8 +576,8 @@ Subject: [PATCH] BLAH TWO
 
 And then we will see the scissors.
 
- This line is not a scissors mark -- >8 -- but talks about it.
- - - >8 - - please remove everything above this line - - >8 - -
+ This is not a scissors line -- >8 -- but talks about it.
+-- >8 -- please remove everything above this line -- >8 --
 
 Subject: [PATCH] Teach mailinfo to ignore everything before -- >8 -- mark
 From: Junio C Hamano <[email protected]>
Signature · 5 lines
1.6.4.1

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/