git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: revision.c alters commit object state ; also no cleanup
Date: Wed, 28 Aug 2019 08:21:10 +0900	[thread overview]
Message-ID: <20190827232110.f3xdnr3i4e2aqenn@glandium.org> (raw)
In-Reply-To: <xmqq7e6zhk0a.fsf@gitster-ct.c.googlers.com>

On Mon, Aug 26, 2019 at 11:14:13AM -0700, Junio C Hamano wrote:
> 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.

I guess you're refering to save_parents/get_saved_parents? Would it make
sense for things to be reversed, as in, make revision.c keep the
simplified parents separately, and traverse through that?

Mike

      reply	other threads:[~2019-08-27 23:21 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
2019-08-27 23:21   ` Mike Hommey [this message]

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

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

  git send-email \
    --in-reply-to=20190827232110.f3xdnr3i4e2aqenn@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).