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>
This commit is contained in:
parent
99e09cce8d
commit
7cbcf4d557
@ -21,6 +21,7 @@ SYNOPSIS
|
|||||||
[ \--stdin ]
|
[ \--stdin ]
|
||||||
[ \--topo-order ]
|
[ \--topo-order ]
|
||||||
[ \--parents ]
|
[ \--parents ]
|
||||||
|
[ \--encoding[=<encoding>] ]
|
||||||
[ \--(author|committer|grep)=<pattern> ]
|
[ \--(author|committer|grep)=<pattern> ]
|
||||||
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
|
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
|
||||||
[ \--pretty | \--header ]
|
[ \--pretty | \--header ]
|
||||||
|
@ -76,3 +76,10 @@ displayed in full, regardless of whether --abbrev or
|
|||||||
--no-abbrev are used, and 'parents' information show the
|
--no-abbrev are used, and 'parents' information show the
|
||||||
true parent commits, without taking grafts nor history
|
true parent commits, without taking grafts nor history
|
||||||
simplification into account.
|
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.
|
||||||
|
@ -1039,6 +1039,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
|
|||||||
all_match = 1;
|
all_match = 1;
|
||||||
continue;
|
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);
|
opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
|
||||||
if (opts > 0) {
|
if (opts > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user