зеркало из https://github.com/microsoft/git.git
log: honor grep.* configuration
Now the grep_config() callback is reusable from other configuration callbacks, call it from git_log_config() so that grep.patterntype and friends can be used with the commands in the "git log" family. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
727b6fc3ed
Коммит
0657bcbf6f
|
@ -351,7 +351,8 @@ static int git_log_config(const char *var, const char *value, void *cb)
|
|||
}
|
||||
if (!prefixcmp(var, "color.decorate."))
|
||||
return parse_decorate_color_config(var, 15, value);
|
||||
|
||||
if (grep_config(var, value, cb) < 0)
|
||||
return -1;
|
||||
return git_diff_ui_config(var, value, cb);
|
||||
}
|
||||
|
||||
|
@ -360,6 +361,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
|
|||
struct rev_info rev;
|
||||
struct setup_revision_opt opt;
|
||||
|
||||
init_grep_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
|
@ -450,6 +452,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
|||
struct pathspec match_all;
|
||||
int i, count, ret = 0;
|
||||
|
||||
init_grep_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_pathspec(&match_all, NULL);
|
||||
|
@ -530,6 +533,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
|
|||
struct rev_info rev;
|
||||
struct setup_revision_opt opt;
|
||||
|
||||
init_grep_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
|
@ -552,6 +556,7 @@ int cmd_log(int argc, const char **argv, const char *prefix)
|
|||
struct rev_info rev;
|
||||
struct setup_revision_opt opt;
|
||||
|
||||
init_grep_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
|
@ -1121,6 +1126,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||
extra_hdr.strdup_strings = 1;
|
||||
extra_to.strdup_strings = 1;
|
||||
extra_cc.strdup_strings = 1;
|
||||
init_grep_defaults();
|
||||
git_config(git_format_config, NULL);
|
||||
init_revisions(&rev, prefix);
|
||||
rev.commit_format = CMIT_FMT_EMAIL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче