Skip to content
  • Kevin Bracey's avatar
    revision.c: make default history consider bottom commits · 141efdba
    Kevin Bracey authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Previously, the default history treated bottom commits the same as any
    other UNINTERESTING commit, which could force it down side branches.
    
    Consider the following history:
    
       *A--*B---D--*F         * marks !TREESAME parent paths
         \     /*
          `-C-'
    
    When requesting "B..F", B is UNINTERESTING but TREESAME to D. C is
    !UNINTERESTING.
    
    So default following would go from D into the irrelevant side branch C
    to A, rather than to B.  Note also that if there had been an extra
    !UNINTERESTING commit B1 between B and D, it wouldn't have gone down C.
    
    Change the default following to test relevant_commit() instead of
    !UNINTERESTING, so it can proceed straight from D to B, thus finishing
    the traversal of that path.
    
    Signed-off-by: default avatarKevin Bracey <kevin@bracey.fi>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    141efdba