@@ -338,27 +338,27 @@ static int handle_alias(int *argcp, const char ***argv)
338
338
if (ret >= 0 ) /* normal exit */
339
339
exit (ret );
340
340
341
- die_errno ("while expanding alias '%s': '%s'" ,
342
- alias_command , alias_string + 1 );
341
+ die_errno (_ ( "while expanding alias '%s': '%s'" ) ,
342
+ alias_command , alias_string + 1 );
343
343
}
344
344
count = split_cmdline (alias_string , & new_argv );
345
345
if (count < 0 )
346
- die ("Bad alias.%s string: %s" , alias_command ,
346
+ die (_ ( "bad alias.%s string: %s") , alias_command ,
347
347
split_cmdline_strerror (count ));
348
348
option_count = handle_options (& new_argv , & count , & envchanged );
349
349
if (envchanged )
350
- die ("alias '%s' changes environment variables.\n"
351
- "You can use '!git' in the alias to do this" ,
352
- alias_command );
350
+ die (_ ( "alias '%s' changes environment variables.\n"
351
+ "You can use '!git' in the alias to do this" ) ,
352
+ alias_command );
353
353
memmove (new_argv - option_count , new_argv ,
354
354
count * sizeof (char * ));
355
355
new_argv -= option_count ;
356
356
357
357
if (count < 1 )
358
- die ("empty alias for %s" , alias_command );
358
+ die (_ ( "empty alias for %s" ) , alias_command );
359
359
360
360
if (!strcmp (alias_command , new_argv [0 ]))
361
- die ("recursive alias: %s" , alias_command );
361
+ die (_ ( "recursive alias: %s" ) , alias_command );
362
362
363
363
trace_argv_printf (new_argv ,
364
364
"trace: alias expansion: %s =>" ,
@@ -409,7 +409,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
409
409
410
410
if (!help && get_super_prefix ()) {
411
411
if (!(p -> option & SUPPORT_SUPER_PREFIX ))
412
- die ("%s doesn't support --super-prefix" , p -> cmd );
412
+ die (_ ( "%s doesn't support --super-prefix" ) , p -> cmd );
413
413
}
414
414
415
415
if (!help && p -> option & NEED_WORK_TREE )
@@ -433,11 +433,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
433
433
434
434
/* Check for ENOSPC and EIO errors.. */
435
435
if (fflush (stdout ))
436
- die_errno ("write failure on standard output" );
436
+ die_errno (_ ( "write failure on standard output" ) );
437
437
if (ferror (stdout ))
438
- die ("unknown write failure on standard output" );
438
+ die (_ ( "unknown write failure on standard output" ) );
439
439
if (fclose (stdout ))
440
- die_errno ("close failed on standard output" );
440
+ die_errno (_ ( "close failed on standard output" ) );
441
441
return 0 ;
442
442
}
443
443
@@ -648,7 +648,7 @@ static void execv_dashed_external(const char **argv)
648
648
int status ;
649
649
650
650
if (get_super_prefix ())
651
- die ("%s doesn't support --super-prefix" , argv [0 ]);
651
+ die (_ ( "%s doesn't support --super-prefix" ) , argv [0 ]);
652
652
653
653
if (use_pager == -1 && !is_builtin (argv [0 ]))
654
654
use_pager = check_pager_config (argv [0 ]);
@@ -760,7 +760,7 @@ int cmd_main(int argc, const char **argv)
760
760
if (skip_prefix (cmd , "git-" , & cmd )) {
761
761
argv [0 ] = cmd ;
762
762
handle_builtin (argc , argv );
763
- die ("cannot handle %s as a builtin" , cmd );
763
+ die (_ ( "cannot handle %s as a builtin" ) , cmd );
764
764
}
765
765
766
766
/* Look for flags.. */
@@ -773,7 +773,7 @@ int cmd_main(int argc, const char **argv)
773
773
} else {
774
774
/* The user didn't specify a command; give them help */
775
775
commit_pager_choice ();
776
- printf ("usage: %s\n\n" , git_usage_string );
776
+ printf (_ ( "usage: %s\n\n" ) , git_usage_string );
777
777
list_common_cmds_help ();
778
778
printf ("\n%s\n" , _ (git_more_info_string ));
779
779
exit (1 );
0 commit comments