@@ -629,6 +629,9 @@ static int survey_objects_path_walk_fn(const char *path,
629629 type , oids -> nr );
630630 increment_object_totals (ctx , oids , type );
631631
632+ ctx -> progress_nr += oids -> nr ;
633+ display_progress (ctx -> progress , ctx -> progress_nr );
634+
632635 return 0 ;
633636}
634637
@@ -658,13 +661,26 @@ static void survey_phase_objects(struct survey_context *ctx)
658661 repo_init_revisions (ctx -> repo , & revs , "" );
659662 revs .tag_objects = 1 ;
660663
664+ ctx -> progress_nr = 0 ;
665+ ctx -> progress_total = ctx -> ref_array .nr ;
666+ if (ctx -> opts .show_progress )
667+ ctx -> progress = start_progress (ctx -> repo ,
668+ _ ("Preparing object walk" ),
669+ ctx -> progress_total );
661670 for (int i = 0 ; i < ctx -> ref_array .nr ; i ++ ) {
662671 struct ref_array_item * item = ctx -> ref_array .items [i ];
663672 add_pending_oid (& revs , NULL , & item -> objectname , add_flags );
664673 display_progress (ctx -> progress , ++ (ctx -> progress_nr ));
665674 }
675+ stop_progress (& ctx -> progress );
666676
677+ ctx -> progress_nr = 0 ;
678+ ctx -> progress_total = 0 ;
679+ if (ctx -> opts .show_progress )
680+ ctx -> progress = start_progress (ctx -> repo ,
681+ _ ("Walking objects" ), 0 );
667682 walk_objects_by_path (& info );
683+ stop_progress (& ctx -> progress );
668684
669685 release_revisions (& revs );
670686 trace2_region_leave ("survey" , "phase/objects" , ctx -> repo );
0 commit comments