@@ -629,6 +629,9 @@ static int survey_objects_path_walk_fn(const char *path,
629
629
type , oids -> nr );
630
630
increment_object_totals (ctx , oids , type );
631
631
632
+ ctx -> progress_nr += oids -> nr ;
633
+ display_progress (ctx -> progress , ctx -> progress_nr );
634
+
632
635
return 0 ;
633
636
}
634
637
@@ -658,13 +661,26 @@ static void survey_phase_objects(struct survey_context *ctx)
658
661
repo_init_revisions (ctx -> repo , & revs , "" );
659
662
revs .tag_objects = 1 ;
660
663
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 );
661
670
for (int i = 0 ; i < ctx -> ref_array .nr ; i ++ ) {
662
671
struct ref_array_item * item = ctx -> ref_array .items [i ];
663
672
add_pending_oid (& revs , NULL , & item -> objectname , add_flags );
664
673
display_progress (ctx -> progress , ++ (ctx -> progress_nr ));
665
674
}
675
+ stop_progress (& ctx -> progress );
666
676
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 );
667
682
walk_objects_by_path (& info );
683
+ stop_progress (& ctx -> progress );
668
684
669
685
release_revisions (& revs );
670
686
trace2_region_leave ("survey" , "phase/objects" , ctx -> repo );
0 commit comments