diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-27 21:08:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-27 21:08:57 +0300 |
commit | 630501ceef6a70203f89ab62c9909c96a2d751ec (patch) | |
tree | 3c5c2719dbb9958b37c12ffd98aa368dbc73c1e2 /builtin | |
parent | dda83e69d08ce37c64157007e050a142660fd15c (diff) | |
parent | 50bebf98d96a6ccf2ca5c76da5dd8afff6933a4c (diff) |
Merge branch 'jc/countermand-format-attach'
The format.attach configuration variable lacked a way to override a
value defined in a lower-priority configuration file (e.g. the
system one) by redefining it in a higher-priority configuration
file. Now, setting format.attach to an empty string means show the
patch inline in the e-mail message, without using MIME attachment.
This is a backward incompatible change.
* jc/countermand-format-attach:
format.attach: allow empty value to disable multi-part messages
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c index 04412dd9c9..a70fba198f 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1007,6 +1007,8 @@ static int git_format_config(const char *var, const char *value, void *cb) if (!strcmp(var, "format.attach")) { if (value && *value) default_attach = xstrdup(value); + else if (value && !*value) + FREE_AND_NULL(default_attach); else default_attach = xstrdup(git_version_string); return 0; |