git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-mailinfo fixes for patch munging

From
DZDon Zickus <dzickus@redhat.com>
Date
Mar 30, 2007, 21:32 UTC
Message-ID
<20070330213210.GL11029@redhat.com>
In-Reply-To
<7vmz1uzaxd.fsf@assigned-by-dhcp.cox.net>
On Fri, Mar 30, 2007 at 02:19:42PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Don Zickus <dzickus@redhat.com> writes:
> 
> > Don't translate the patch to UTF-8, instead preserve the data as is.  Also
> > allow overwriting the primary mail headers (addresses Linus's concern).  
> >
> > I also revert a test case that was included in the original patch.  Now it
> > makes sense why it was the way it was. :)
> >
> > Cheers,
> > Don
> 
> Thanks.  Sign-off would have been nice.
Doh. Sorry.  Should I repost with fix below?
Show 5 quoted lines
> This check_header is called from each multi-part boundary with
> overwrite=1, so if you have two parts and you have From: or
> Subject: in the multi-part header (not in-body), wouldn't they
> overwrite what we already have?  That is not desired, I would
> think.

Hmm. I guess I never thought about that case. You are right, that check can be changed to a zero (because the rfc2822 are checked elsewhere).

Show 21 quoted lines
> > @@ -614,6 +614,7 @@ static int find_boundary(void)
> >  
> >  static int handle_boundary(void)
> >  {
> > +	char newline[]="\n";
> >  again:
> >  	if (!memcmp(line+content_top->boundary_len, "--", 2)) {
> >  		/* we hit an end boundary */
> > @@ -628,7 +629,7 @@ again:
> >  					"can't recover\n");
> >  			exit(1);
> >  		}
> > -		handle_filter("\n");
> > +		handle_filter(newline);
> >  
> >  		/* skip to the next boundary */
> >  		if (!find_boundary())
> 
> These two hunks certainly do not hurt, but why?  Is this about
> the constness of the first parameter to handle_filter() and its
> call chain?
Yeah, I SEGFAULT'd when trying to convert_to_utf8() a fixed string. :-)

Cheers, Don

Previous: Junio C Hamano
Message 3 of 3 in “git-mailinfo fixes for patch munging”
  1. git-mailinfo fixes for patch mungingDon Zickus, Mar 30, 2007
  2. Junio C HamanoMar 30, 2007
  3. Don ZickusMar 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.