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