Skip to content
  • Jeff Hostetler's avatar
    progress: add sparse mode to force 100% complete message · 9d81ecb5
    Jeff Hostetler authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Add new start_sparse_progress() and start_delayed_sparse_progress()
    constructors and "sparse" flag to struct progress.
    
    Teach stop_progress() to force a 100% complete progress message before
    printing the final "done" message when "sparse" is set.
    
    Calling display_progress() for every item in a large set can
    be expensive.  If callers try to filter this for performance
    reasons, such as emitting every k-th item, progress would
    not reach 100% unless they made a final call to display_progress()
    with the item count before calling stop_progress().
    
    Now this is automatic when "sparse" is set.
    
    Signed-off-by: default avatarJeff Hostetler <jeffhost@microsoft.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9d81ecb5