@@ -190,7 +190,7 @@ static enum eol output_eol(enum crlf_action crlf_action)
190
190
/* fall through */
191
191
return text_eol_is_crlf () ? EOL_CRLF : EOL_LF ;
192
192
}
193
- warning ("illegal crlf_action %d" , (int )crlf_action );
193
+ warning (_ ( "illegal crlf_action %d" ) , (int )crlf_action );
194
194
return core_eol ;
195
195
}
196
196
@@ -207,7 +207,7 @@ static void check_global_conv_flags_eol(const char *path, enum crlf_action crlf_
207
207
else if (conv_flags & CONV_EOL_RNDTRP_WARN )
208
208
warning (_ ("CRLF will be replaced by LF in %s.\n"
209
209
"The file will have its original line"
210
- " endings in your working directory. " ), path );
210
+ " endings in your working directory" ), path );
211
211
} else if (old_stats -> lonelf && !new_stats -> lonelf ) {
212
212
/*
213
213
* CRLFs would be added by checkout
@@ -217,7 +217,7 @@ static void check_global_conv_flags_eol(const char *path, enum crlf_action crlf_
217
217
else if (conv_flags & CONV_EOL_RNDTRP_WARN )
218
218
warning (_ ("LF will be replaced by CRLF in %s.\n"
219
219
"The file will have its original line"
220
- " endings in your working directory. " ), path );
220
+ " endings in your working directory" ), path );
221
221
}
222
222
}
223
223
@@ -492,7 +492,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len,
492
492
dst = reencode_string_len (src , src_len , enc , default_encoding ,
493
493
& dst_len );
494
494
if (!dst ) {
495
- error ("failed to encode '%s' from %s to %s" ,
495
+ error (_ ( "failed to encode '%s' from %s to %s" ) ,
496
496
path , default_encoding , enc );
497
497
return 0 ;
498
498
}
@@ -670,7 +670,8 @@ static int filter_buffer_or_fd(int in, int out, void *data)
670
670
671
671
if (start_command (& child_process )) {
672
672
strbuf_release (& cmd );
673
- return error ("cannot fork to run external filter '%s'" , params -> cmd );
673
+ return error (_ ("cannot fork to run external filter '%s'" ),
674
+ params -> cmd );
674
675
}
675
676
676
677
sigchain_push (SIGPIPE , SIG_IGN );
@@ -689,13 +690,14 @@ static int filter_buffer_or_fd(int in, int out, void *data)
689
690
if (close (child_process .in ))
690
691
write_err = 1 ;
691
692
if (write_err )
692
- error ("cannot feed the input to external filter '%s'" , params -> cmd );
693
+ error (_ ("cannot feed the input to external filter '%s'" ),
694
+ params -> cmd );
693
695
694
696
sigchain_pop (SIGPIPE );
695
697
696
698
status = finish_command (& child_process );
697
699
if (status )
698
- error ("external filter '%s' failed %d" , params -> cmd , status );
700
+ error (_ ( "external filter '%s' failed %d" ) , params -> cmd , status );
699
701
700
702
strbuf_release (& cmd );
701
703
return (write_err || status );
@@ -730,13 +732,13 @@ static int apply_single_file_filter(const char *path, const char *src, size_t le
730
732
return 0 ; /* error was already reported */
731
733
732
734
if (strbuf_read (& nbuf , async .out , len ) < 0 ) {
733
- err = error ("read from external filter '%s' failed" , cmd );
735
+ err = error (_ ( "read from external filter '%s' failed" ) , cmd );
734
736
}
735
737
if (close (async .out )) {
736
- err = error ("read from external filter '%s' failed" , cmd );
738
+ err = error (_ ( "read from external filter '%s' failed" ) , cmd );
737
739
}
738
740
if (finish_async (& async )) {
739
- err = error ("external filter '%s' failed" , cmd );
741
+ err = error (_ ( "external filter '%s' failed" ) , cmd );
740
742
}
741
743
742
744
if (!err ) {
@@ -790,7 +792,7 @@ static void handle_filter_error(const struct strbuf *filter_status,
790
792
* Something went wrong with the protocol filter.
791
793
* Force shutdown and restart if another blob requires filtering.
792
794
*/
793
- error ("external filter '%s' failed" , entry -> subprocess .cmd );
795
+ error (_ ( "external filter '%s' failed" ) , entry -> subprocess .cmd );
794
796
subprocess_stop (& subprocess_map , & entry -> subprocess );
795
797
free (entry );
796
798
}
@@ -838,7 +840,7 @@ static int apply_multi_file_filter(const char *path, const char *src, size_t len
838
840
else if (wanted_capability & CAP_SMUDGE )
839
841
filter_type = "smudge" ;
840
842
else
841
- die ("unexpected filter type" );
843
+ die (_ ( "unexpected filter type" ) );
842
844
843
845
sigchain_push (SIGPIPE , SIG_IGN );
844
846
@@ -849,7 +851,7 @@ static int apply_multi_file_filter(const char *path, const char *src, size_t len
849
851
850
852
err = strlen (path ) > LARGE_PACKET_DATA_MAX - strlen ("pathname=\n" );
851
853
if (err ) {
852
- error ("path name too long for external filter" );
854
+ error (_ ( "path name too long for external filter" ) );
853
855
goto done ;
854
856
}
855
857
@@ -923,8 +925,8 @@ int async_query_available_blobs(const char *cmd, struct string_list *available_p
923
925
assert (subprocess_map_initialized );
924
926
entry = (struct cmd2process * )subprocess_find_entry (& subprocess_map , cmd );
925
927
if (!entry ) {
926
- error ("external filter '%s' is not available anymore although "
927
- "not all paths have been filtered" , cmd );
928
+ error (_ ( "external filter '%s' is not available anymore although "
929
+ "not all paths have been filtered" ) , cmd );
928
930
return 0 ;
929
931
}
930
932
process = & entry -> subprocess .process ;
@@ -1395,7 +1397,7 @@ int convert_to_git(const struct index_state *istate,
1395
1397
1396
1398
ret |= apply_filter (path , src , len , -1 , dst , ca .drv , CAP_CLEAN , NULL );
1397
1399
if (!ret && ca .drv && ca .drv -> required )
1398
- die ("%s: clean filter '%s' failed" , path , ca .drv -> name );
1400
+ die (_ ( "%s: clean filter '%s' failed" ) , path , ca .drv -> name );
1399
1401
1400
1402
if (ret && dst ) {
1401
1403
src = dst -> buf ;
@@ -1429,7 +1431,7 @@ void convert_to_git_filter_fd(const struct index_state *istate,
1429
1431
assert (ca .drv -> clean || ca .drv -> process );
1430
1432
1431
1433
if (!apply_filter (path , NULL , 0 , fd , dst , ca .drv , CAP_CLEAN , NULL ))
1432
- die ("%s: clean filter '%s' failed" , path , ca .drv -> name );
1434
+ die (_ ( "%s: clean filter '%s' failed" ) , path , ca .drv -> name );
1433
1435
1434
1436
encode_to_git (path , dst -> buf , dst -> len , dst , ca .working_tree_encoding , conv_flags );
1435
1437
crlf_to_git (istate , path , dst -> buf , dst -> len , dst , ca .crlf_action , conv_flags );
@@ -1472,7 +1474,7 @@ static int convert_to_working_tree_internal(const char *path, const char *src,
1472
1474
ret_filter = apply_filter (
1473
1475
path , src , len , -1 , dst , ca .drv , CAP_SMUDGE , dco );
1474
1476
if (!ret_filter && ca .drv && ca .drv -> required )
1475
- die ("%s: smudge filter %s failed" , path , ca .drv -> name );
1477
+ die (_ ( "%s: smudge filter %s failed" ) , path , ca .drv -> name );
1476
1478
1477
1479
return ret | ret_filter ;
1478
1480
}
0 commit comments