Merge branch 'ah/log-decorate-default-to-auto'
authorJunio C Hamano <gitster@pobox.com>
Tue, 23 May 2017 04:46:02 +0000 (13:46 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 May 2017 04:46:03 +0000 (13:46 +0900)
Setting "log.decorate=false" in the configuration file did not take
effect in v2.13, which has been corrected.

* ah/log-decorate-default-to-auto:
builtin/log: honor log.decorate

1  2 
builtin/log.c
diff --combined builtin/log.c
index fd3d10ec21752b6ba78e3a2b4cd7a72af6ca8fe7,cf2b736ca761194108740f435534b2bc8eb601a5..631fbc984f00a509f7b01b8bd93893a4988e0359
@@@ -110,6 -110,8 +110,8 @@@ static void init_log_defaults(void
  {
        init_grep_defaults();
        init_diff_ui_defaults();
+       decoration_style = auto_decoration_style();
  }
  
  static void cmd_log_init_defaults(struct rev_info *rev)
@@@ -410,8 -412,6 +412,6 @@@ static int git_log_config(const char *v
                if (decoration_style < 0)
                        decoration_style = 0; /* maybe warn? */
                return 0;
-       } else {
-               decoration_style = auto_decoration_style();
        }
        if (!strcmp(var, "log.showroot")) {
                default_show_root = git_config_bool(var, value);
@@@ -910,8 -910,8 +910,8 @@@ static void get_patch_ids(struct rev_in
  static void gen_message_id(struct rev_info *info, char *base)
  {
        struct strbuf buf = STRBUF_INIT;
 -      strbuf_addf(&buf, "%s.%lu.git.%s", base,
 -                  (unsigned long) time(NULL),
 +      strbuf_addf(&buf, "%s.%"PRItime".git.%s", base,
 +                  (timestamp_t) time(NULL),
                    git_committer_info(IDENT_NO_NAME|IDENT_NO_DATE|IDENT_STRICT));
        info->message_id = strbuf_detach(&buf, NULL);
  }
@@@ -1091,7 -1091,8 +1091,7 @@@ static const char *set_outdir(const cha
        if (!output_directory)
                return prefix;
  
 -      return xstrdup(prefix_filename(prefix, outdir_offset,
 -                                     output_directory));
 +      return prefix_filename(prefix, output_directory);
  }
  
  static const char * const builtin_format_patch_usage[] = {