From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 1/2] revision: mark contents of an uninteresting tree uninteresting
Date: Wed, 15 Jan 2014 16:35:16 -0800 [thread overview]
Message-ID: <xmqq61pk227v.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140116001607.GN18964@google.com> (Jonathan Nieder's message of "Wed, 15 Jan 2014 16:16:07 -0800")
Jonathan Nieder <jrnieder@gmail.com> writes:
> Junio C Hamano wrote:
>
>> we see the top-level tree marked as uninteresting (i.e. ^A^{tree} in
>> the above example) and call mark_tree_uninteresting() on it; this
>> unfortunately prevents us from recursing into the tree and marking
>> the objects in the tree as uninteresting.
>
> So the tree is marked uninteresting twice --- once by setting in the
> UNINTERESTING flag in handle_revision_arg() and a second attempted
> time in mark_tree_uninteresting()? Makes sense.
It is that the original code, the setting of the mark on the object
itself was inconsistent. For commits, we did that ourselves; for
trees, we let the mark_tree_uninteresting() do so.
And mark_tree_uninteresting() has this quirk that it refuses to
recurse into the given tree, if the tree is already marked as
uninteresting by the caller.
We did not have the same problem on commits, because we make a
similar call to mark-parents-uninteresting but the function does not
care if the commit itself is already marked as uninteresting.
The distinction does not matter when tags are not involved. But
once we start propagating the flags from a tag to objects that the
tag points at, it starts to matter. The caller will mark the object
uninteresting in the loop that peels the tag, and the resulting
object is uninteresting. It is not a problem for commits. It was a
problem for trees, which used mark_tree_uninteresting() to mark all
the objects inside the tree uninteresting, including the tree itself.
next prev parent reply other threads:[~2014-01-16 0:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 23:59 [PATCH v2 0/2] Propagating flags carefully from the command line Junio C Hamano
2014-01-15 23:59 ` [PATCH v2 1/2] revision: mark contents of an uninteresting tree uninteresting Junio C Hamano
2014-01-16 0:16 ` Jonathan Nieder
2014-01-16 0:35 ` Junio C Hamano [this message]
2014-01-15 23:59 ` [PATCH v2 2/2] revision: propagate flag bits from tags to pointees Junio C Hamano
2014-01-21 5:27 ` [PATCH v2 0/2] Propagating flags carefully from the command line Jeff King
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=xmqq61pk227v.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/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.