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

Re: [PATCH 2/5] Improve message-id generation flow control for format-patch

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 19, 2008, 16:51 UTC
Message-ID
<alpine.LSU.1.00.0802191646570.30505@racer.site>
In-Reply-To
<alpine.LNX.1.00.0802191108450.19024@iabervon.org>
Hi,
On Tue, 19 Feb 2008, Daniel Barkalow wrote:
Show 30 quoted lines
> On Tue, 19 Feb 2008, Johannes Schindelin wrote:
> 
> > On Mon, 18 Feb 2008, Daniel Barkalow wrote:
> > 
> > > diff --git a/revision.h b/revision.h
> > > index 8572315..e3559d0 100644
> > > --- a/revision.h
> > > +++ b/revision.h
> > > @@ -74,7 +74,7 @@ struct rev_info {
> > >  	struct log_info *loginfo;
> > >  	int		nr, total;
> > >  	const char	*mime_boundary;
> > > -	const char	*message_id;
> > > +	char		*message_id;
> > >  	const char	*ref_message_id;
> > >  	const char	*add_signoff;
> > >  	const char	*extra_headers;
> > 
> > Mini-nit: technically, ref_message_id should be "char *", too.
> 
> I'd intended ref_message_id to just reference the string owned by a 
> different message's message_id, but that doesn't really work with struct 
> rev_info. I bet you'd like me to not leak memory out through 
> ref_message_id, too. I think I want to see how the code to collect the 
> set of commits in the series (for more capable generation of cover 
> letter contents) goes before changing this either way.
> 
> (It's incidentally kind of amusing that you managed to convey the way 
> you thought the code should be designed, different from how I'd designed 
> it, through a note on whether a struct field should be const or not.)
Hehe!

You're right in that the revision machinery needs some cleaning up. AFAIK there is no method yet to release the memory allocated during one revision walk (including the preparation).

And you're right that this should be done separately, so please kindly accept my apologies while I retract my comment.

Ciao, Dscho

Previous: Daniel BarkalowNext: Daniel Barkalow
Message 5 of 12 in “Add more tests for format-patch”
  1. 1/5 Add more tests for format-patchDaniel Barkalow, Feb 19, 2008
  2. 2/5 Improve message-id generation flow control for format-patchDaniel Barkalow, Feb 19, 2008
  3. Johannes SchindelinFeb 19, 2008
  4. Daniel BarkalowFeb 19, 2008
  5. Johannes SchindelinFeb 19, 2008
  6. 3/5 Export some email and pretty-printing functionsDaniel Barkalow, Feb 19, 2008
  7. Johannes SchindelinFeb 19, 2008
  8. Daniel BarkalowFeb 19, 2008
  9. 4/5 Retain extra blank lines between the summary and the bodyDaniel Barkalow, Feb 19, 2008
  10. 5/5 Add a --cover-letter option to format-patchDaniel Barkalow, Feb 19, 2008
  11. Junio C HamanoFeb 20, 2008
  12. Daniel BarkalowFeb 20, 2008

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.