Skip to content
  • Linus Torvalds's avatar
    Fix parent rewriting in --early-output · 7dc0fe3b
    Linus Torvalds authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We cannot tell a node that has been checked and found not to be
    interesting (which does not have the TREECHANGE flag) from a
    node that hasn't been checked if it is interesting or not,
    without relying on something else, such as object->parsed.
    
    But an object can get the "parsed" flag for other reasons.
    Which means that "TREECHANGE" has the wrong polarity.
    
    This changes the way how the path pruning logic marks an
    uninteresting commits.  From now on, we consider a commit
    interesting by default, and explicitly mark the ones we decided
    to prune.  The flag is renamed to "TREESAME".
    
    Then, this fixes the logic to show the early output with
    incomplete pruning.  It basically says "a commit that has
    TREESAME set is kind-of-UNINTERESTING", but obviously in a
    different way than an outright UNINTERESTING commit.  Until we
    parse and examine enough parents to determine if a commit
    becomes surely "kind-of-UNINTERESTING", we avoid rewriting
    the ancestry so that later rounds can fix things up.
    
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    7dc0fe3b