diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-30 22:59:08 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-31 02:58:32 +0300 |
commit | 7cbcf4d5579bdc5d9f8a4bf3f37d3390fc6e2572 (patch) | |
tree | cc59576b721617ee30e804ff3634e462d7b0123c | |
parent | 99e09cce8d0eace48209483b07e2a9d99542bd04 (diff) |
Move commit reencoding parameter parsing to revision.c
This way, git-rev-list and git-diff-tree with --pretty can use
it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | Documentation/git-rev-list.txt | 1 | ||||
-rw-r--r-- | Documentation/pretty-formats.txt | 7 | ||||
-rw-r--r-- | revision.c | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 9e0dcf8d3f..86c94e7dfd 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -21,6 +21,7 @@ SYNOPSIS [ \--stdin ] [ \--topo-order ] [ \--parents ] + [ \--encoding[=<encoding>] ] [ \--(author|committer|grep)=<pattern> ] [ [\--objects | \--objects-edge] [ \--unpacked ] ] [ \--pretty | \--header ] diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 996f628903..fb0b0b9582 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -76,3 +76,10 @@ displayed in full, regardless of whether --abbrev or --no-abbrev are used, and 'parents' information show the true parent commits, without taking grafts nor history simplification into account. + +--encoding[=<encoding>]:: + The commit objects record the encoding used for the log message + in their encoding header; this option can be used to tell the + command to re-code the commit log message in the encoding + preferred by the user. For non plumbing commands this + defaults to UTF-8. diff --git a/revision.c b/revision.c index af9f87418c..6e4ec46302 100644 --- a/revision.c +++ b/revision.c @@ -1039,6 +1039,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch all_match = 1; continue; } + if (!strncmp(arg, "--encoding=", 11)) { + arg += 11; + if (strcmp(arg, "none")) + git_log_output_encoding = strdup(arg); + else + git_log_output_encoding = ""; + continue; + } opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); if (opts > 0) { |