зеркало из https://github.com/microsoft/git.git
builtin-log: respect diff configuration options
The log commands are all capable of generating diffs, so we should respect those configuration options for diffs here. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
be4c7014f2
Коммит
97beb812db
|
@ -47,6 +47,7 @@ int cmd_whatchanged(int argc, const char **argv, char **envp)
|
||||||
{
|
{
|
||||||
struct rev_info rev;
|
struct rev_info rev;
|
||||||
|
|
||||||
|
git_config(git_diff_config);
|
||||||
init_revisions(&rev);
|
init_revisions(&rev);
|
||||||
rev.diff = 1;
|
rev.diff = 1;
|
||||||
rev.diffopt.recursive = 1;
|
rev.diffopt.recursive = 1;
|
||||||
|
@ -61,6 +62,7 @@ int cmd_show(int argc, const char **argv, char **envp)
|
||||||
{
|
{
|
||||||
struct rev_info rev;
|
struct rev_info rev;
|
||||||
|
|
||||||
|
git_config(git_diff_config);
|
||||||
init_revisions(&rev);
|
init_revisions(&rev);
|
||||||
rev.diff = 1;
|
rev.diff = 1;
|
||||||
rev.diffopt.recursive = 1;
|
rev.diffopt.recursive = 1;
|
||||||
|
@ -77,6 +79,7 @@ int cmd_log(int argc, const char **argv, char **envp)
|
||||||
{
|
{
|
||||||
struct rev_info rev;
|
struct rev_info rev;
|
||||||
|
|
||||||
|
git_config(git_diff_config);
|
||||||
init_revisions(&rev);
|
init_revisions(&rev);
|
||||||
rev.always_show_header = 1;
|
rev.always_show_header = 1;
|
||||||
cmd_log_init(argc, argv, envp, &rev);
|
cmd_log_init(argc, argv, envp, &rev);
|
||||||
|
@ -102,7 +105,7 @@ static int git_format_config(const char *var, const char *value)
|
||||||
strcat(extra_headers, value);
|
strcat(extra_headers, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return git_default_config(var, value);
|
return git_diff_config(var, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,6 +237,7 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
|
||||||
struct diff_options patch_id_opts;
|
struct diff_options patch_id_opts;
|
||||||
char *add_signoff = NULL;
|
char *add_signoff = NULL;
|
||||||
|
|
||||||
|
git_config(git_format_config);
|
||||||
init_revisions(&rev);
|
init_revisions(&rev);
|
||||||
rev.commit_format = CMIT_FMT_EMAIL;
|
rev.commit_format = CMIT_FMT_EMAIL;
|
||||||
rev.verbose_header = 1;
|
rev.verbose_header = 1;
|
||||||
|
@ -243,7 +247,6 @@ int cmd_format_patch(int argc, const char **argv, char **envp)
|
||||||
rev.diffopt.msg_sep = "";
|
rev.diffopt.msg_sep = "";
|
||||||
rev.diffopt.recursive = 1;
|
rev.diffopt.recursive = 1;
|
||||||
|
|
||||||
git_config(git_format_config);
|
|
||||||
rev.extra_headers = extra_headers;
|
rev.extra_headers = extra_headers;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче