diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-01-15 15:38:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-15 15:48:58 -0800 |
commit | 2ac5e4470b7a17303b10ba539d8aa84e870bade9 (patch) | |
tree | 582ddda6811b44d3e4b12b9b076e32d98c3496f5 /t/t5100/patch0002 | |
parent | revision: do not peel tags used in range notation (diff) | |
download | tgif-2ac5e4470b7a17303b10ba539d8aa84e870bade9.tar.xz |
revision: mark contents of an uninteresting tree uninteresting
"git rev-list --objects ^A^{tree} B^{tree}" ought to mean "I want a
list of objects inside B's tree, but please exclude the objects that
appear inside A's tree".
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.
The reason why "git log ^A A" yields an empty set of commits,
i.e. we do not have a similar issue for commits, is because we call
mark_parents_uninteresting() after seeing an uninteresting commit.
The uninteresting-ness of the commit itself does not prevent its
parents from being marked as uninteresting.
Introduce mark_tree_contents_uninteresting() and structure the code
in handle_commit() in such a way that it makes it the responsibility
of the callchain leading to this function to mark commits, trees and
blobs as uninteresting, and also make it the responsibility of the
helpers called from this function to mark objects that are reachable
from them.
Note that this is a very old bug that probably dates back to the day
when "rev-list --objects" was introduced. The line to clear
tree->object.parsed at the end of mark_tree_contents_uninteresting()
can be removed when this fix is merged to the codebase after
6e454b9a (clear parsed flag when we free tree buffers, 2013-06-05).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100/patch0002')
0 files changed, 0 insertions, 0 deletions