@@ -850,6 +850,15 @@ static int iterate_ref_map(void *cb_data, struct object_id *oid)
850
850
return 0 ;
851
851
}
852
852
853
+ static const char warn_show_forced_updates [] =
854
+ N_ ("Fetch normally indicates which branches had a forced update,\n"
855
+ "but that check has been disabled. To re-enable, use '--show-forced-updates'\n"
856
+ "flag or run 'git config fetch.showForcedUpdates true'." );
857
+ static const char warn_time_show_forced_updates [] =
858
+ N_ ("It took %.2f seconds to check forced updates. You can use\n"
859
+ "'--no-show-forced-updates' or run 'git config fetch.showForcedUpdates false'\n"
860
+ " to avoid this check.\n" );
861
+
853
862
static int store_updated_refs (const char * raw_url , const char * remote_name ,
854
863
int connectivity_checked , struct ref * ref_map )
855
864
{
@@ -1005,12 +1014,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
1005
1014
1006
1015
if (advice_fetch_show_forced_updates ) {
1007
1016
if (!fetch_show_forced_updates ) {
1008
- warning (_ ("Fetch normally indicates which branches had a forced update, but that check has been disabled." ));
1009
- warning (_ ("To re-enable, use '--show-forced-updates' flag or run 'git config fetch.showForcedUpdates true'." ));
1017
+ warning (_ (warn_show_forced_updates ));
1010
1018
} else if (forced_updates_ms > FORCED_UPDATES_DELAY_WARNING_IN_MS ) {
1011
- warning (_ ("It took %.2f seconds to check forced updates. You can use '--no-show-forced-updates'\n" ),
1019
+ warning (_ (warn_time_show_forced_updates ),
1012
1020
forced_updates_ms / 1000.0 );
1013
- warning (_ ("or run 'git config fetch.showForcedUpdates false' to avoid this check.\n" ));
1014
1021
}
1015
1022
}
1016
1023
0 commit comments