Linus Torvalds [off-list ref] writes:
What do you mean by "middle"?
No, it should only look at From: and Subject: lines if they are at the
very top, with no other non-whitespace lines above them. But when it looks
at them and uses the data from them, it should then remove them from the
body - they are "conceptually" just extended header lines that just
happened to technically (from an rfc822 standpoint) be in the body of the
email.
Below is an example of the kind of patch that inspired me to relax the
rules on parsing in body headers (this comes from Andi Kleen quilt tree).
The first line in this instance is obviously a subject line but there
is not really good way to detect that. Then we get a From: line.
Now I doubt any patches ever hit the mail in this format and it probably
isn't worth it to track down every variation of patch headers in existence.
But if we don't find a From: header in the body prefix it seems to make
sense to keep looking for headers in the body, and to use the information
if we find it.
---
Kdump i386 nmi event notification fix
From: Vivek Goyal <redacted>
After a crash we should wait for NMI IPI event and not for external NMI or
NMI watchdog tick.
Signed-off-by: Vivek Goyal <redacted>
Signed-off-by: Andi Kleen <redacted>
Cc: Don Zickus <redacted>
Cc: Andi Kleen <redacted>
Signed-off-by: Andrew Morton <redacted>
---
arch/i386/kernel/crash.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: linux/arch/i386/kernel/crash.c
===================================================================
--- linux.orig/arch/i386/kernel/crash.c
+++ linux/arch/i386/kernel/crash.c
@@ -102,7 +102,7 @@ static int crash_nmi_callback(struct not
struct pt_regs fixed_regs;
int cpu;
- if (val != DIE_NMI)
+ if (val != DIE_NMI_IPI)
return NOTIFY_OK;
regs = ((struct die_args *)data)->regs;
@@ -113,7 +113,7 @@ static int crash_nmi_callback(struct not
* an NMI if system was initially booted with nmi_watchdog parameter.
*/
if (cpu == crashing_cpu)
- return 1;
+ return NOTIFY_STOP;
local_irq_disable();
if (!user_mode_vm(regs)) {
On Mon, 12 Jun 2006, Eric W. Biederman wrote:
Below is an example of the kind of patch that inspired me to relax the
rules on parsing in body headers (this comes from Andi Kleen quilt tree).
And this is wrong.
We should _not_ accept crappy patches, and then start guessing at what the
person meant.
From the very beginning of git, I tried to make it extremely clear that
there is never any guessing going on. We don't use "heuristics" except as
a pure optimization: ie a heuristic can have a _performance_ impact, but
it must never EVER have semantic impact.
SCM's are not about guessing. They are about saving the _exact_ state that
the user asked for. No "let's try to be nice", no gray areas.
If the new git-applymbox just takes random lines from the body of the
email, and decides that they may be authorship information, then that is a
BUG. The "From: " line in the middle of an email may well be about
somebody having _discovered_ the bug, and we're quoting him as part of the
explanation. It does NOT mean that it's about authorship.
So we should ONLY check for "From:" (and perhaps "Subject:" and "Date:")
at the very top of the email body. NOWHERE ELSE.
The fact that somebody has a crappy quilt tree, and the fact that quilt is
very much a "anything goes" kind of laissez faire system does not mean,
and should NEVER mean that git becomes the same kind of mess of "let's do
a best effort and try to guess what somebody means" kind of thing.
I check and edit my emails before I apply them, and I try to teach the
people who send them manners and what the rules are. THAT is the way to
handle this, not by having the tool itself become unreliable and random
Linus
Hi,
On Mon, 12 Jun 2006, Eric W. Biederman wrote:
quoted hunk
Index: linux/arch/i386/kernel/crash.c
===================================================================
--- linux.orig/arch/i386/kernel/crash.c
+++ linux/arch/i386/kernel/crash.c
Tsk, tsk. Not using git, are we?
Ciao,
Dscho
On Tue, 13 Jun 2006 00:43:06 +0200 (CEST) Johannes Schindelin wrote:
Hi,
On Mon, 12 Jun 2006, Eric W. Biederman wrote:
quoted
Index: linux/arch/i386/kernel/crash.c
===================================================================
--- linux.orig/arch/i386/kernel/crash.c
+++ linux/arch/i386/kernel/crash.c
Tsk, tsk. Not using git, are we?
what's your point?
Eric clearly identified where the patch came from.
---
~Randy