@@ -630,6 +630,9 @@ static int survey_objects_path_walk_fn(const char *path UNUSED,
630630 type , oids -> nr );
631631 increment_object_totals (ctx , oids , type );
632632
633+ ctx -> progress_nr += oids -> nr ;
634+ display_progress (ctx -> progress , ctx -> progress_nr );
635+
633636 return 0 ;
634637}
635638
@@ -659,13 +662,26 @@ static void survey_phase_objects(struct survey_context *ctx)
659662 repo_init_revisions (ctx -> repo , & revs , "" );
660663 revs .tag_objects = 1 ;
661664
665+ ctx -> progress_nr = 0 ;
666+ ctx -> progress_total = ctx -> ref_array .nr ;
667+ if (ctx -> opts .show_progress )
668+ ctx -> progress = start_progress (ctx -> repo ,
669+ _ ("Preparing object walk" ),
670+ ctx -> progress_total );
662671 for (int i = 0 ; i < ctx -> ref_array .nr ; i ++ ) {
663672 struct ref_array_item * item = ctx -> ref_array .items [i ];
664673 add_pending_oid (& revs , NULL , & item -> objectname , add_flags );
665674 display_progress (ctx -> progress , ++ (ctx -> progress_nr ));
666675 }
676+ stop_progress (& ctx -> progress );
667677
678+ ctx -> progress_nr = 0 ;
679+ ctx -> progress_total = 0 ;
680+ if (ctx -> opts .show_progress )
681+ ctx -> progress = start_progress (ctx -> repo ,
682+ _ ("Walking objects" ), 0 );
668683 walk_objects_by_path (& info );
684+ stop_progress (& ctx -> progress );
669685
670686 release_revisions (& revs );
671687 trace2_region_leave ("survey" , "phase/objects" , ctx -> repo );
0 commit comments