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