Skip to content
  • Jeff King's avatar
    pack-objects: match prune logic for discarding objects · abcb8655
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    A recent commit taught git-prune to keep non-recent objects
    that are reachable from recent ones. However, pack-objects,
    when loosening unreachable objects, tries to optimize out
    the write in the case that the object will be immediately
    pruned. It now gets this wrong, since its rule does not
    reflect the new prune code (and this can be seen by running
    t6501 with a strategically placed repack).
    
    Let's teach pack-objects similar logic.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    abcb8655