@@ -619,6 +619,9 @@ static int survey_objects_path_walk_fn(const char *path,
619
619
type , oids -> nr );
620
620
increment_object_totals (ctx , oids , type );
621
621
622
+ ctx -> progress_nr += oids -> nr ;
623
+ display_progress (ctx -> progress , ctx -> progress_nr );
624
+
622
625
return 0 ;
623
626
}
624
627
@@ -648,13 +651,24 @@ static void survey_phase_objects(struct survey_context *ctx)
648
651
repo_init_revisions (ctx -> repo , & revs , "" );
649
652
revs .tag_objects = 1 ;
650
653
654
+ ctx -> progress_nr = 0 ;
655
+ ctx -> progress_total = ctx -> ref_array .nr ;
656
+ if (ctx -> opts .show_progress )
657
+ ctx -> progress = start_progress (_ ("Preparing object walk" ),
658
+ ctx -> progress_total );
651
659
for (size_t i = 0 ; i < ctx -> ref_array .nr ; i ++ ) {
652
660
struct ref_array_item * item = ctx -> ref_array .items [i ];
653
661
add_pending_oid (& revs , NULL , & item -> objectname , add_flags );
654
662
display_progress (ctx -> progress , ++ (ctx -> progress_nr ));
655
663
}
664
+ stop_progress (& ctx -> progress );
656
665
666
+ ctx -> progress_nr = 0 ;
667
+ ctx -> progress_total = 0 ;
668
+ if (ctx -> opts .show_progress )
669
+ ctx -> progress = start_progress (_ ("Walking objects" ), 0 );
657
670
walk_objects_by_path (& info );
671
+ stop_progress (& ctx -> progress );
658
672
659
673
release_revisions (& revs );
660
674
trace2_region_leave ("survey" , "phase/objects" , ctx -> repo );
0 commit comments