log: add log.showSignature configuration variable
Users may want to always use "--show-signature" while using git-log and related commands. When log.showSignature is set to true, git-log and related commands will behave as if "--show-signature" was given to them. Note that this config variable is meant to affect git-log, git-show, git-whatchanged and git-reflog. Other commands like git-format-patch, git-rev-list are not to be affected by this config variable. Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
aa3799996c
commit
fce04c3ca6
@ -33,6 +33,7 @@ static const char *default_date_mode = NULL;
|
||||
static int default_abbrev_commit;
|
||||
static int default_show_root = 1;
|
||||
static int default_follow;
|
||||
static int default_show_signature;
|
||||
static int decoration_style;
|
||||
static int decoration_given;
|
||||
static int use_mailmap_config;
|
||||
@ -119,6 +120,7 @@ static void cmd_log_init_defaults(struct rev_info *rev)
|
||||
rev->abbrev_commit = default_abbrev_commit;
|
||||
rev->show_root_diff = default_show_root;
|
||||
rev->subject_prefix = fmt_patch_subject_prefix;
|
||||
rev->show_signature = default_show_signature;
|
||||
DIFF_OPT_SET(&rev->diffopt, ALLOW_TEXTCONV);
|
||||
|
||||
if (default_date_mode)
|
||||
@ -409,6 +411,10 @@ static int git_log_config(const char *var, const char *value, void *cb)
|
||||
use_mailmap_config = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "log.showsignature")) {
|
||||
default_show_signature = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (grep_config(var, value, cb) < 0)
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user