X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=diff.c;h=35d3f073859acf66dbd38c6096c0cc47bd26b6e2;hb=9478b11968d61085bb4c4343395b6f52ce06380f;hp=e6846ca7507aa8a423c5e1f89390fa37723248ff;hpb=c13a5aca5da4e94e69d5432aeeafd123221c79e3;p=git.git diff --git a/diff.c b/diff.c index e6846ca75..35d3f0738 100644 --- a/diff.c +++ b/diff.c @@ -25,7 +25,7 @@ static int diff_detect_rename_default; static int diff_rename_limit_default = 400; static int diff_suppress_blank_empty; -int diff_use_color_default = -1; +static int diff_use_color_default = -1; static const char *diff_word_regex_cfg; static const char *external_diff_cmd_cfg; int diff_auto_refresh_index = 1; @@ -1398,11 +1398,11 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions) if (!files) { assert(insertions == 0 && deletions == 0); - return fprintf(fp, "%s\n", _(" 0 files changed")); + return fprintf(fp, "%s\n", " 0 files changed"); } strbuf_addf(&sb, - Q_(" %d file changed", " %d files changed", files), + (files == 1) ? " %d file changed" : " %d files changed", files); /* @@ -1419,8 +1419,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions) * do not translate it. */ strbuf_addf(&sb, - Q_(", %d insertion(+)", ", %d insertions(+)", - insertions), + (insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)", insertions); } @@ -1430,8 +1429,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions) * do not translate it. */ strbuf_addf(&sb, - Q_(", %d deletion(-)", ", %d deletions(-)", - deletions), + (deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)", deletions); } strbuf_addch(&sb, '\n');