git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 2/2] format-patch: always print diffstat in English
Date: Sun, 26 Aug 2012 02:26:56 +0700	[thread overview]
Message-ID: <1345922816-20616-3-git-send-email-pclouds@gmail.com> (raw)
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

  parent reply	other threads:[~2012-08-25 19:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25 19:26 [PATCH RFC 0/2] Mixing English and a local language Nguyễn Thái Ngọc Duy
2012-08-25 19:26 ` [PATCH 1/2] Allow to print diffstat in English regardless current locale Nguyễn Thái Ngọc Duy
2012-08-25 19:26 ` Nguyễn Thái Ngọc Duy [this message]
2012-09-12 14:05 ` [PATCH RFC 0/2] Mixing English and a local language Nguyen Thai Ngoc Duy
2012-09-12 18:18   ` Junio C Hamano
2012-09-13 13:28     ` Jeff King
2012-09-13 14:16       ` [PATCH] Revert diffstat back to English Nguyễn Thái Ngọc Duy
2012-09-13 14:57         ` Jeff King
2012-09-13 17:39         ` Junio C Hamano
2012-09-13 18:40           ` Junio C Hamano
2012-09-13 21:01             ` Jeff King
2012-09-13 21:10               ` Junio C Hamano
2012-09-13 21:20                 ` Jeff King
2012-09-13 21:26                   ` Junio C Hamano
2012-09-13 21:31                     ` Jeff King
2012-09-13 21:47                       ` Junio C Hamano
2012-09-14  0:11                         ` Jeff King
2012-09-14 11:56                           ` Nguyen Thai Ngoc Duy
2012-09-14 16:54         ` Junio C Hamano
2012-09-15  2:41           ` Nguyen Thai Ngoc Duy
2012-09-13 17:30       ` [PATCH RFC 0/2] Mixing English and a local language Junio C Hamano
2012-09-13 17:52         ` Junio C Hamano
2012-09-13 18:04           ` Jeff King
2012-09-13 18:00         ` Jeff King
2012-09-14 10:41           ` Michael J Gruber
2012-09-14 11:35             ` Nguyen Thai Ngoc Duy
2012-09-14 12:40               ` [PATCH] Makefile: respect $LINGUAS variable on selecting .mo files to install Nguyễn Thái Ngọc Duy
2012-09-14 13:06                 ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345922816-20616-3-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).