pass config slots as pointers instead of offsets
[gitweb.git] / builtin / log.c
index 27c1b65db46bb1bead9045b7b6be08a1ee199835..4c5fc4bff5b955f712024a935b8b804fd7d5e363 100644 (file)
@@ -389,7 +389,7 @@ static int git_log_config(const char *var, const char *value, void *cb)
                return 0;
        }
        if (starts_with(var, "color.decorate."))
-               return parse_decorate_color_config(var, 15, value);
+               return parse_decorate_color_config(var, var + 15, value);
        if (!strcmp(var, "log.mailmap")) {
                use_mailmap_config = git_config_bool(var, value);
                return 0;
@@ -861,7 +861,7 @@ static void add_branch_description(struct strbuf *buf, const char *branch_name)
        read_branch_desc(&desc, branch_name);
        if (desc.len) {
                strbuf_addch(buf, '\n');
-               strbuf_add(buf, desc.buf, desc.len);
+               strbuf_addbuf(buf, &desc);
                strbuf_addch(buf, '\n');
        }
 }