[PATCH v4 2/4] i18n.patchencoding: introduce a new config variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This varible will be used by git mailinfo's --recode-patch parameter only.

Signed-off-by: ZHANG, Le <r0bertz@xxxxxxxxxx>
---
 cache.h       |    1 +
 config.c      |    3 +++
 environment.c |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cache.h b/cache.h
index 33decd9..d04aeff 100644
--- a/cache.h
+++ b/cache.h
@@ -1015,6 +1015,7 @@ extern int user_ident_explicitly_given;
 extern int user_ident_sufficiently_given(void);
 
 extern const char *git_commit_encoding;
+extern const char *git_patch_encoding;
 extern const char *git_log_output_encoding;
 extern const char *git_mailmap_file;
 
diff --git a/config.c b/config.c
index c63d683..14b0f92 100644
--- a/config.c
+++ b/config.c
@@ -674,6 +674,9 @@ static int git_default_i18n_config(const char *var, const char *value)
 	if (!strcmp(var, "i18n.commitencoding"))
 		return git_config_string(&git_commit_encoding, var, value);
 
+	if (!strcmp(var, "i18n.patchencoding"))
+		return git_config_string(&git_patch_encoding, var, value);
+
 	if (!strcmp(var, "i18n.logoutputencoding"))
 		return git_config_string(&git_log_output_encoding, var, value);
 
diff --git a/environment.c b/environment.c
index de5581f..b2870f4 100644
--- a/environment.c
+++ b/environment.c
@@ -23,6 +23,7 @@ int log_all_ref_updates = -1; /* unspecified */
 int warn_ambiguous_refs = 1;
 int repository_format_version;
 const char *git_commit_encoding;
+const char *git_patch_encoding;
 const char *git_log_output_encoding;
 int shared_repository = PERM_UMASK;
 const char *apply_default_whitespace;
-- 
1.7.3.2.344.gb3680.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]