Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2 1/2] revision: mark contents of an uninteresting tree uninteresting

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:40

Jonathan Nieder [off-list ref] writes:
Junio C Hamano wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help