@@ -74,14 +74,14 @@ static void remote_ref_atom_parser(struct used_atom *atom, const char *arg)
74
74
static void body_atom_parser (struct used_atom * atom , const char * arg )
75
75
{
76
76
if (arg )
77
- die ("%%(body) does not take arguments" );
77
+ die (_ ( "%%(body) does not take arguments" ) );
78
78
atom -> u .contents .option = C_BODY_DEP ;
79
79
}
80
80
81
81
static void subject_atom_parser (struct used_atom * atom , const char * arg )
82
82
{
83
83
if (arg )
84
- die ("%%(subject) does not take arguments" );
84
+ die (_ ( "%%(subject) does not take arguments" ) );
85
85
atom -> u .contents .option = C_SUB ;
86
86
}
87
87
@@ -241,7 +241,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
241
241
if (* sp == '*' && sp < ep )
242
242
sp ++ ; /* deref */
243
243
if (ep <= sp )
244
- die ("malformed field name: %.*s" , (int )(ep - atom ), atom );
244
+ die (_ ( "malformed field name: %.*s" ) , (int )(ep - atom ), atom );
245
245
246
246
/* Do we have the atom already used elsewhere? */
247
247
for (i = 0 ; i < used_atom_cnt ; i ++ ) {
@@ -267,7 +267,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
267
267
}
268
268
269
269
if (ARRAY_SIZE (valid_atom ) <= i )
270
- die ("unknown field name: %.*s" , (int )(ep - atom ), atom );
270
+ die (_ ( "unknown field name: %.*s" ) , (int )(ep - atom ), atom );
271
271
272
272
/* Add it in, including the deref prefix */
273
273
at = used_atom_cnt ;
@@ -421,7 +421,7 @@ int verify_ref_format(const char *format)
421
421
int at ;
422
422
423
423
if (!ep )
424
- return error ("malformed format string %s" , sp );
424
+ return error (_ ( "malformed format string %s" ) , sp );
425
425
/* sp points at "%(" and ep points at the closing ")" */
426
426
at = parse_ref_filter_atom (sp + 2 , ep );
427
427
cp = ep + 1 ;
@@ -875,12 +875,12 @@ static const char *strip_ref_components(const char *refname, const char *nr_arg)
875
875
const char * start = refname ;
876
876
877
877
if (nr < 1 || * end != '\0' )
878
- die (":strip= requires a positive integer argument" );
878
+ die (_ ( ":strip= requires a positive integer argument" ) );
879
879
880
880
while (remaining ) {
881
881
switch (* start ++ ) {
882
882
case '\0' :
883
- die ("ref '%s' does not have %ld components to :strip" ,
883
+ die (_ ( "ref '%s' does not have %ld components to :strip" ) ,
884
884
refname , nr );
885
885
case '/' :
886
886
remaining -- ;
@@ -1043,7 +1043,7 @@ static void populate_value(struct ref_array_item *ref)
1043
1043
else if (skip_prefix (formatp , "strip=" , & arg ))
1044
1044
refname = strip_ref_components (refname , arg );
1045
1045
else
1046
- die ("unknown %.*s format %s" ,
1046
+ die (_ ( "unknown %.*s format %s" ) ,
1047
1047
(int )(formatp - name ), name , formatp );
1048
1048
}
1049
1049
@@ -1063,10 +1063,10 @@ static void populate_value(struct ref_array_item *ref)
1063
1063
need_obj :
1064
1064
buf = get_obj (ref -> objectname , & obj , & size , & eaten );
1065
1065
if (!buf )
1066
- die ("missing object %s for %s" ,
1066
+ die (_ ( "missing object %s for %s" ) ,
1067
1067
sha1_to_hex (ref -> objectname ), ref -> refname );
1068
1068
if (!obj )
1069
- die ("parse_object_buffer failed on %s for %s" ,
1069
+ die (_ ( "parse_object_buffer failed on %s for %s" ) ,
1070
1070
sha1_to_hex (ref -> objectname ), ref -> refname );
1071
1071
1072
1072
grab_values (ref -> value , 0 , obj , buf , size );
@@ -1094,10 +1094,10 @@ static void populate_value(struct ref_array_item *ref)
1094
1094
*/
1095
1095
buf = get_obj (tagged , & obj , & size , & eaten );
1096
1096
if (!buf )
1097
- die ("missing object %s for %s" ,
1097
+ die (_ ( "missing object %s for %s" ) ,
1098
1098
sha1_to_hex (tagged ), ref -> refname );
1099
1099
if (!obj )
1100
- die ("parse_object_buffer failed on %s for %s" ,
1100
+ die (_ ( "parse_object_buffer failed on %s for %s" ) ,
1101
1101
sha1_to_hex (tagged ), ref -> refname );
1102
1102
grab_values (ref -> value , 1 , obj , buf , size );
1103
1103
if (!eaten )
@@ -1370,12 +1370,12 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
1370
1370
unsigned int kind ;
1371
1371
1372
1372
if (flag & REF_BAD_NAME ) {
1373
- warning ("ignoring ref with broken name %s" , refname );
1373
+ warning (_ ( "ignoring ref with broken name %s" ) , refname );
1374
1374
return 0 ;
1375
1375
}
1376
1376
1377
1377
if (flag & REF_ISBROKEN ) {
1378
- warning ("ignoring broken ref %s" , refname );
1378
+ warning (_ ( "ignoring broken ref %s" ) , refname );
1379
1379
return 0 ;
1380
1380
}
1381
1381
0 commit comments