Subject: Re: [PATCH] git-mailinfo: Fix getting the subject from the body

From: Don Zickus <[email-masked]>
Date: Mon, 14 Jul 2008 23:13:56 -0400

On Sat, Jul 12, 2008 at 02:36:57AM -0700, Junio C Hamano wrote:
> Another thing I noticed and found puzzling is the handling of ">From "
> line that is shown in the context below.  check_header() is supposed to
> return true when it handled header (i.e. not part of the commit message)
> and return false when line is not part of the header.  As ">From " is part
> of the commit log message, shouldn't it return zero?
> 
> Don, this part was what you introduced.  Has this codepath ever been
> exercised in the real life?

Heh.  Most emails I deal with usually wind up causing the code to stop
looking for header info (still_looking=0).  So I never ran into that
scenario.  And I never really tried to rely on inbody stuff.

I thought I was mimicing the original code, guess not.

Now that I think about it, I did run into a situation last year where
git-mailinfo parsed the '>From' as an inbody header instead of a commit
msg.  I just put a stupid hack in my scripts to work around, thinking it
was my scripts.

Anyway if it returns zero, wouldn't it be better to just remove the check
to begin with?  I kinda forgot why it is there in the first place (my
changes just copied it from somewhere else).

Cheers,
Don