git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] format-patch: always print diffstat in English

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Aug 25, 2012, 19:26 UTC
Message-ID
<1345922816-20616-3-git-send-email-pclouds@gmail.com>
In-Reply-To
<1345922816-20616-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/log.c | 1 +
 diff.c        | 4 ++--
 diff.h        | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index ecc2793..62f4b7e 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1225,6 +1225,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 
 	/* Always generate a patch */
 	rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
+	rev.diffopt.no_l10n = 1;
 
 	if (!DIFF_OPT_TST(&rev.diffopt, TEXT) && !no_binary_diff)
 		DIFF_OPT_SET(&rev.diffopt, BINARY);
diff --git a/diff.c b/diff.c
index 47d7e50..a20cfcc 100644
--- a/diff.c
+++ b/diff.c
@@ -1687,7 +1687,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 		extra_shown = 1;
 	}
 	fprintf(options->file, "%s", line_prefix);
-	print_stat_summary(options->file, 0, total_files, adds, dels);
+	print_stat_summary(options->file, options->no_l10n, total_files, adds, dels);
 }
 
 static void show_shortstats(struct diffstat_t *data, struct diff_options *options)
@@ -1716,7 +1716,7 @@ static void show_shortstats(struct diffstat_t *data, struct diff_options *option
 				options->output_prefix_data);
 		fprintf(options->file, "%s", msg->buf);
 	}
-	print_stat_summary(options->file, 0, total_files, adds, dels);
+	print_stat_summary(options->file, options->no_l10n, total_files, adds, dels);
 }
 
 static void show_numstat(struct diffstat_t *data, struct diff_options *options)
diff --git a/diff.h b/diff.h
index eec79ef..ea4075d 100644
--- a/diff.h
+++ b/diff.h
@@ -125,6 +125,7 @@ struct diff_options {
 	int dirstat_permille;
 	int setup;
 	int abbrev;
+	int no_l10n;
 	const char *prefix;
 	int prefix_length;
 	const char *stat_sep;
-- 
1.7.12.rc1.27.g6d3049b.dirty
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 3 of 28 in “Mixing English and a local language”
  1. 0/2 Mixing English and a local languageNguyễn Thái Ngọc Duy, Aug 25, 2012
  2. 1/2 Allow to print diffstat in English regardless current localeNguyễn Thái Ngọc Duy, Aug 25, 2012
  3. 2/2 format-patch: always print diffstat in EnglishNguyễn Thái Ngọc Duy, Aug 25, 2012
  4. Nguyen Thai Ngoc DuySep 12, 2012
  5. Junio C HamanoSep 12, 2012
  6. Jeff KingSep 13, 2012
  7. Revert diffstat back to EnglishNguyễn Thái Ngọc Duy, Sep 13, 2012
  8. Jeff KingSep 13, 2012
  9. Junio C HamanoSep 13, 2012
  10. Junio C HamanoSep 13, 2012
  11. Jeff KingSep 13, 2012
  12. Junio C HamanoSep 13, 2012
  13. Jeff KingSep 13, 2012
  14. Junio C HamanoSep 13, 2012
  15. Jeff KingSep 13, 2012
  16. Junio C HamanoSep 13, 2012
  17. Jeff KingSep 14, 2012
  18. Nguyen Thai Ngoc DuySep 14, 2012
  19. Junio C HamanoSep 14, 2012
  20. Nguyen Thai Ngoc DuySep 15, 2012
  21. Junio C HamanoSep 13, 2012
  22. Junio C HamanoSep 13, 2012
  23. Jeff KingSep 13, 2012
  24. Jeff KingSep 13, 2012
  25. Michael J GruberSep 14, 2012
  26. Nguyen Thai Ngoc DuySep 14, 2012
  27. Makefile: respect $LINGUAS variable on selecting .mo files to installNguyễn Thái Ngọc Duy, Sep 14, 2012
  28. Michael J GruberSep 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.