diff options
Diffstat (limited to 'builtin/log.c')
| -rw-r--r-- | builtin/log.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 813b768e24..0368e08926 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -4,8 +4,10 @@ * (C) Copyright 2006 Linus Torvalds * 2006 Junio Hamano */ -#include "cache.h" +#include "git-compat-util.h" +#include "alloc.h" #include "config.h" +#include "hex.h" #include "refs.h" #include "object-store.h" #include "color.h" @@ -1007,6 +1009,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; |
