@@ -632,6 +632,9 @@ static int survey_objects_path_walk_fn(const char *path UNUSED,
632
632
type , oids -> nr );
633
633
increment_object_totals (ctx , oids , type );
634
634
635
+ ctx -> progress_nr += oids -> nr ;
636
+ display_progress (ctx -> progress , ctx -> progress_nr );
637
+
635
638
return 0 ;
636
639
}
637
640
@@ -661,13 +664,24 @@ static void survey_phase_objects(struct survey_context *ctx)
661
664
repo_init_revisions (ctx -> repo , & revs , "" );
662
665
revs .tag_objects = 1 ;
663
666
667
+ ctx -> progress_nr = 0 ;
668
+ ctx -> progress_total = ctx -> ref_array .nr ;
669
+ if (ctx -> opts .show_progress )
670
+ ctx -> progress = start_progress (_ ("Preparing object walk" ),
671
+ ctx -> progress_total );
664
672
for (size_t i = 0 ; i < ctx -> ref_array .nr ; i ++ ) {
665
673
struct ref_array_item * item = ctx -> ref_array .items [i ];
666
674
add_pending_oid (& revs , NULL , & item -> objectname , add_flags );
667
675
display_progress (ctx -> progress , ++ (ctx -> progress_nr ));
668
676
}
677
+ stop_progress (& ctx -> progress );
669
678
679
+ ctx -> progress_nr = 0 ;
680
+ ctx -> progress_total = 0 ;
681
+ if (ctx -> opts .show_progress )
682
+ ctx -> progress = start_progress (_ ("Walking objects" ), 0 );
670
683
walk_objects_by_path (& info );
684
+ stop_progress (& ctx -> progress );
671
685
672
686
release_revisions (& revs );
673
687
trace2_region_leave ("survey" , "phase/objects" , ctx -> repo );
0 commit comments