@@ -74,14 +74,14 @@ static void remote_ref_atom_parser(struct used_atom *atom, const char *arg)
7474static void body_atom_parser (struct used_atom * atom , const char * arg )
7575{
7676 if (arg )
77- die ("%%(body) does not take arguments" );
77+ die (_ ( "%%(body) does not take arguments" ) );
7878 atom -> u .contents .option = C_BODY_DEP ;
7979}
8080
8181static void subject_atom_parser (struct used_atom * atom , const char * arg )
8282{
8383 if (arg )
84- die ("%%(subject) does not take arguments" );
84+ die (_ ( "%%(subject) does not take arguments" ) );
8585 atom -> u .contents .option = C_SUB ;
8686}
8787
@@ -241,7 +241,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
241241 if (* sp == '*' && sp < ep )
242242 sp ++ ; /* deref */
243243 if (ep <= sp )
244- die ("malformed field name: %.*s" , (int )(ep - atom ), atom );
244+ die (_ ( "malformed field name: %.*s" ) , (int )(ep - atom ), atom );
245245
246246 /* Do we have the atom already used elsewhere? */
247247 for (i = 0 ; i < used_atom_cnt ; i ++ ) {
@@ -267,7 +267,7 @@ int parse_ref_filter_atom(const char *atom, const char *ep)
267267 }
268268
269269 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 );
271271
272272 /* Add it in, including the deref prefix */
273273 at = used_atom_cnt ;
@@ -421,7 +421,7 @@ int verify_ref_format(const char *format)
421421 int at ;
422422
423423 if (!ep )
424- return error ("malformed format string %s" , sp );
424+ return error (_ ( "malformed format string %s" ) , sp );
425425 /* sp points at "%(" and ep points at the closing ")" */
426426 at = parse_ref_filter_atom (sp + 2 , ep );
427427 cp = ep + 1 ;
@@ -875,12 +875,12 @@ static const char *strip_ref_components(const char *refname, const char *nr_arg)
875875 const char * start = refname ;
876876
877877 if (nr < 1 || * end != '\0' )
878- die (":strip= requires a positive integer argument" );
878+ die (_ ( ":strip= requires a positive integer argument" ) );
879879
880880 while (remaining ) {
881881 switch (* start ++ ) {
882882 case '\0' :
883- die ("ref '%s' does not have %ld components to :strip" ,
883+ die (_ ( "ref '%s' does not have %ld components to :strip" ) ,
884884 refname , nr );
885885 case '/' :
886886 remaining -- ;
@@ -1043,7 +1043,7 @@ static void populate_value(struct ref_array_item *ref)
10431043 else if (skip_prefix (formatp , "strip=" , & arg ))
10441044 refname = strip_ref_components (refname , arg );
10451045 else
1046- die ("unknown %.*s format %s" ,
1046+ die (_ ( "unknown %.*s format %s" ) ,
10471047 (int )(formatp - name ), name , formatp );
10481048 }
10491049
@@ -1063,10 +1063,10 @@ static void populate_value(struct ref_array_item *ref)
10631063 need_obj :
10641064 buf = get_obj (ref -> objectname , & obj , & size , & eaten );
10651065 if (!buf )
1066- die ("missing object %s for %s" ,
1066+ die (_ ( "missing object %s for %s" ) ,
10671067 sha1_to_hex (ref -> objectname ), ref -> refname );
10681068 if (!obj )
1069- die ("parse_object_buffer failed on %s for %s" ,
1069+ die (_ ( "parse_object_buffer failed on %s for %s" ) ,
10701070 sha1_to_hex (ref -> objectname ), ref -> refname );
10711071
10721072 grab_values (ref -> value , 0 , obj , buf , size );
@@ -1094,10 +1094,10 @@ static void populate_value(struct ref_array_item *ref)
10941094 */
10951095 buf = get_obj (tagged , & obj , & size , & eaten );
10961096 if (!buf )
1097- die ("missing object %s for %s" ,
1097+ die (_ ( "missing object %s for %s" ) ,
10981098 sha1_to_hex (tagged ), ref -> refname );
10991099 if (!obj )
1100- die ("parse_object_buffer failed on %s for %s" ,
1100+ die (_ ( "parse_object_buffer failed on %s for %s" ) ,
11011101 sha1_to_hex (tagged ), ref -> refname );
11021102 grab_values (ref -> value , 1 , obj , buf , size );
11031103 if (!eaten )
@@ -1370,12 +1370,12 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
13701370 unsigned int kind ;
13711371
13721372 if (flag & REF_BAD_NAME ) {
1373- warning ("ignoring ref with broken name %s" , refname );
1373+ warning (_ ( "ignoring ref with broken name %s" ) , refname );
13741374 return 0 ;
13751375 }
13761376
13771377 if (flag & REF_ISBROKEN ) {
1378- warning ("ignoring broken ref %s" , refname );
1378+ warning (_ ( "ignoring broken ref %s" ) , refname );
13791379 return 0 ;
13801380 }
13811381
0 commit comments