From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org, Shawn Pearce <spearce@spearce.org>,
Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>
Subject: Re: [PATCH] fast-import: Do less work when given "from" matches current branch head
Date: Thu, 09 Jul 2015 15:47:56 -0700 [thread overview]
Message-ID: <xmqq380xuew3.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqq7fq9uf1w.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 09 Jul 2015 15:44:27 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Mike Hommey <mh@glandium.org> writes:
>
>>> Does that mean the original code was doing a release that was
>>> unnecessary? Or does it mean this patch changes what happens on
>>> that codepath, namely (1) leaking resource, and/or (2) keeping a
>>> tree of the original 'b' that does not have anything to do with the
>>> tree of 's', preventing the later lazy-load code from reading the
>>> tree of 's' and instead of building on top of a wrong tree content?
>>
>> I guess the question is whether branch_tree.tree can be in a state that
>> doesn't match that of branch_tree.versions[1].sha1. If not, then if s
>> and b have the same branch_tree.versions[1].sha1 for some reason, then
>> keeping the old branch_tree.tree makes no practical difference from
>> resetting it. Except it skips the busy-work.
>
> Perhaps my comment was misleading. I _think_ the state at the end
> of this function (i.e. the latter hunk you added to the function
> makes the above issue I raised go away). It just made me feel
s/this function (/this function is good (/;
> uneasy to leave branch_tree.tree and branch_tree.versions[] in an
> inconsistent state inside this function, while it calls a few helper
> functions (hence my comment on the fact that they do not seem to be
> affected by this inconsistency).
prev parent reply other threads:[~2015-07-09 22:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 22:07 suboptimal behavior of fast-import in some cases with "from" Mike Hommey
2015-07-06 22:54 ` Junio C Hamano
2015-07-09 5:03 ` Mike Hommey
2015-07-09 5:52 ` Mike Hommey
2015-07-09 6:50 ` [PATCH] fast-import: Do less work when given "from" matches current branch head Mike Hommey
2015-07-09 20:37 ` Junio C Hamano
2015-07-09 22:30 ` Mike Hommey
2015-07-09 22:44 ` Junio C Hamano
2015-07-09 22:47 ` Junio C Hamano [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=xmqq380xuew3.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=mh@glandium.org \
--cc=peff@peff.net \
--cc=spearce@spearce.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.