aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-08-29 14:38:37 -0700
committerJunio C Hamano <gitster@pobox.com>2022-08-29 14:39:13 -0700
commitd5fc07df688ace8c5a32f66b358ebd55cdaf4d28 (patch)
tree4e85ad980a53ed4f8632e9d86b86dfff2fb6a429 /builtin/log.c
parent34bc1b1045af6ad813f4de662a453b3c77ba65a7 (diff)
downloadgit-d5fc07df688ace8c5a32f66b358ebd55cdaf4d28.tar.xz
format-patch: learn format.forceInBodyFrom configuration variable
As the need to use the "--force-in-body-from" option primarily is tied to which mailing list the mails go to (and get their From: address mangled), it is likely that a user who needs to use this option once to interact with their upstream project needs to use it for all patches they send out. Add a configuration variable, suitable for setting in the local configuration file per repository, for this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 78ccd37bd9..776bc9afdb 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1007,6 +1007,10 @@ static int git_format_config(const char *var, const char *value, void *cb)
from = NULL;
return 0;
}
+ if (!strcmp(var, "format.forceinbodyfrom")) {
+ force_in_body_from = git_config_bool(var, value);
+ return 0;
+ }
if (!strcmp(var, "format.notes")) {
int b = git_parse_maybe_bool(value);
if (b < 0)