git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: revision.c alters commit object state ; also no cleanup
Date: Mon, 26 Aug 2019 11:14:13 -0700	[thread overview]
Message-ID: <xmqq7e6zhk0a.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190826085844.ue77hen2z6rggpe5@glandium.org> (Mike Hommey's message of "Mon, 26 Aug 2019 17:58:44 +0900")

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.


  reply	other threads:[~2019-08-26 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  8:58 revision.c alters commit object state ; also no cleanup Mike Hommey
2019-08-26 18:14 ` Junio C Hamano [this message]
2019-08-27 23:21   ` Mike Hommey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7e6zhk0a.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).