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

Re: revision.c alters commit object state ; also no cleanup

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2019, 18:14 UTC
Message-ID
<xmqq7e6zhk0a.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190826085844.ue77hen2z6rggpe5@glandium.org>
Mike Hommey <mh@glandium.org> writes:
> First, revision.c doesn't come with a function to clear a struct
> rev_info....
> Then, revision.c kind of does nasty things to commit objects...

Yeah, these two stem from the "run once and let exit() clean things up" design the oldest part of the system shares. Regarding the latter, i.e. parent rewriting, I recall that there is a codepath that saves the original true parents away in a second field when we know we would want to show it (and avoid the overhead of copying when we do not have to), so you should be able to extend it to keep the original parent list.

Previous: Mike HommeyNext: Mike Hommey
Message 2 of 3 in “revision.c alters commit object state ; also no cleanup”
  1. Mike HommeyAug 26, 2019
  2. Junio C HamanoAug 26, 2019
  3. Mike HommeyAug 27, 2019

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.