@@ -34,7 +34,6 @@ extern int am_sender;
3434extern int am_daemon ;
3535extern int inc_recurse ;
3636extern int no_i_r_skip_unchanged ;
37- extern int skip_unchanged_negotiated ;
3837extern int relative_paths ;
3938extern struct stats stats ;
4039extern int implied_dirs ;
@@ -2236,14 +2235,14 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
22362235
22372236/* Pre-scan the file list to mark unchanged files and adjust stats.total_size.
22382237 * This allows accurate progress reporting on resumed transfers. */
2239- static void prescan_for_unchanged (const char * local_name , int f_out )
2238+ void prescan_for_unchanged (const char * local_name )
22402239{
22412240 int i , active_count = 0 , skipped_count = 0 ;
22422241 char fbuf [MAXPATHLEN ];
22432242 STRUCT_STAT st ;
22442243
2245- /* Only prescan if feature was negotiated with remote side */
2246- if (!no_i_r_skip_unchanged || !skip_unchanged_negotiated || ! cur_flist )
2244+ /* Only prescan if feature is enabled */
2245+ if (!no_i_r_skip_unchanged || !cur_flist )
22472246 return ;
22482247
22492248 if (DEBUG_GTE (GENR , 1 ))
@@ -2292,21 +2291,13 @@ static void prescan_for_unchanged(const char *local_name, int f_out)
22922291 }
22932292 }
22942293
2295- /* Update stats to reflect skipped files */
2294+ /* Update stats to reflect only active files for progress display */
22962295 stats .num_files = active_count ;
22972296 stats .num_skipped_files = skipped_count ;
22982297
22992298 if (DEBUG_GTE (GENR , 1 ))
23002299 rprintf (FINFO , "skipped %d unchanged files, %d active, adjusted size: %.2f GB\n" ,
23012300 skipped_count , active_count , (double )stats .total_size / 1024 / 1024 / 1024 );
2302-
2303- /* Send skipped count and adjusted total_size to sender for accurate progress display */
2304- if (f_out >= 0 && skip_unchanged_negotiated ) {
2305- char buf [12 ];
2306- SIVAL (buf , 0 , skipped_count );
2307- SIVAL64 (buf , 4 , stats .total_size );
2308- send_msg (MSG_FLIST_COUNT , buf , 12 , -1 );
2309- }
23102301}
23112302
23122303void generate_files (int f_out , const char * local_name )
@@ -2364,13 +2355,7 @@ void generate_files(int f_out, const char *local_name)
23642355 }
23652356
23662357 dflt_perms = (ACCESSPERMS & ~orig_umask );
2367-
2368- /* Pre-scan to mark unchanged files for accurate progress reporting */
2369- if (no_i_r_skip_unchanged && !skip_unchanged_negotiated ) {
2370- rprintf (FWARNING , "WARNING: --no-i-r-skip-unchanged requested but not supported by remote rsync.\n" );
2371- rprintf (FWARNING , " Falling back to standard --no-i-r behavior (no progress optimization).\n" );
2372- }
2373- prescan_for_unchanged (local_name , f_out );
2358+ stats .current_active_index = 0 ;
23742359
23752360 do {
23762361#ifdef SUPPORT_HARD_LINKS
0 commit comments