Skip to content
  • Johannes Schindelin's avatar
    shallow: offer to prune only non-existing entries · 2588f6ed
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The `prune_shallow()` function wants a full reachability check to be
    completed before it goes to work, to ensure that all unreachable entries
    are removed from the shallow file.
    
    However, in the upcoming patch we do not even want to go that far. We
    really only need to remove entries corresponding to pruned commits, i.e.
    to commits that no longer exist.
    
    Let's support that use case.
    
    Rather than extending the signature of `prune_shallow()` to accept
    another Boolean, let's turn it into a bit field and declare constants,
    for readability.
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    2588f6ed