diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-28 19:03:02 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-28 19:03:02 -0800 |
commit | eff73751bb94b0241fd2204effb8680fe9973cbf (patch) | |
tree | 5fe6f0f55988d64a7b8b841c62b1c996a3fda5bf /builtin-log.c | |
parent | 013672bc589da395fcba9bf62d699e70f3764689 (diff) | |
parent | 7255ff0446217ad723dad6088504a18f6afb15db (diff) | |
download | git-eff73751bb94b0241fd2204effb8680fe9973cbf.tar.gz |
Merge branch 'jc/utf8'
* jc/utf8:
t3900: test conversion to non UTF-8 as well
Rename t3900 test vector file
UTF-8: introduce i18n.logoutputencoding.
Teach log family --encoding
i18n.logToUTF8: convert commit log message to UTF-8
Move encoding conversion routine out of mailinfo to utf8.c
Conflicts:
commit.c
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/builtin-log.c b/builtin-log.c index 8df3c1394a..a59b4acef1 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -20,6 +20,8 @@ void add_head(struct rev_info *revs); static void cmd_log_init(int argc, const char **argv, const char *prefix, struct rev_info *rev) { + int i; + rev->abbrev = DEFAULT_ABBREV; rev->commit_format = CMIT_FMT_DEFAULT; rev->verbose_header = 1; @@ -27,8 +29,18 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix, argc = setup_revisions(argc, argv, rev, "HEAD"); if (rev->diffopt.pickaxe || rev->diffopt.filter) rev->always_show_header = 0; - if (argc > 1) - die("unrecognized argument: %s", argv[1]); + for (i = 1; i < argc; i++) { + const char *arg = argv[i]; + if (!strncmp(arg, "--encoding=", 11)) { + arg += 11; + if (strcmp(arg, "none")) + git_log_output_encoding = strdup(arg); + else + git_log_output_encoding = ""; + } + else + die("unrecognized argument: %s", arg); + } } static int cmd_log_walk(struct rev_info *rev) |