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
This commit is contained in:
Junio C Hamano
2016-07-06 13:38:07 -07:00
11 changed files with 24 additions and 21 deletions

View File

@ -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)
{