aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-06 13:38:07 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-06 13:38:08 -0700
commitb8b6365a8a214f2427f2cf9334fd43ace0be619c (patch)
tree983ce79cdb05e7d8612b3240699b9cbf20370a30 /builtin/log.c
parent7e58b8166e6ac191739cf9001e73b2157f3aead5 (diff)
parent2721ce21e439ee0726dc69073acd7e0d2b2407b3 (diff)
downloadgit-b8b6365a8a214f2427f2cf9334fd43ace0be619c.tar.gz
git-b8b6365a8a214f2427f2cf9334fd43ace0be619c.tar.xz
Merge branch 'jk/string-list-static-init'
Instead of taking advantage of a struct string_list that is allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind, initialize them explicitly as such, to document their behaviour better. * jk/string-list-static-init: use string_list initializer consistently blame,shortlog: don't make local option variables static interpret-trailers: don't duplicate option strings parse_opt_string_list: stop allocating new strings
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 099f4f7be..8eef94f33 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -674,9 +674,9 @@ static int auto_number = 1;
static char *default_attach = NULL;
-static struct string_list extra_hdr;
-static struct string_list extra_to;
-static struct string_list extra_cc;
+static struct string_list extra_hdr = STRING_LIST_INIT_NODUP;
+static struct string_list extra_to = STRING_LIST_INIT_NODUP;
+static struct string_list extra_cc = STRING_LIST_INIT_NODUP;
static void add_header(const char *value)
{