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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux