travis-ci: print the "tip of branch is exactly at tag" message in color
[gitweb.git] / config.c
index 4638b0696ab8885afe1fc696dd6e0a25dcc1c89f..acebc85d81372f15d3d490d84dc751f59bde26c4 100644 (file)
--- a/config.c
+++ b/config.c
@@ -16,6 +16,7 @@
 #include "string-list.h"
 #include "utf8.h"
 #include "dir.h"
+#include "color.h"
 
 struct config_source {
        struct config_source *prev;
@@ -238,7 +239,7 @@ static int include_by_gitdir(const struct config_options *opts,
        }
 
        ret = !wildmatch(pattern.buf + prefix, text.buf + prefix,
-                        icase ? WM_CASEFOLD : 0, NULL);
+                        icase ? WM_CASEFOLD : 0);
 
        if (!ret && !already_tried_absolute) {
                /*
@@ -1350,6 +1351,9 @@ int git_default_config(const char *var, const char *value, void *dummy)
        if (starts_with(var, "advice."))
                return git_default_advice_config(var, value);
 
+       if (git_color_config(var, value, dummy) < 0)
+               return -1;
+
        if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
                pager_use_color = git_config_bool(var,value);
                return 0;
@@ -1714,15 +1718,18 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha
        return 0;
 }
 
-static int config_set_element_cmp(const struct config_set_element *e1,
-                                const struct config_set_element *e2, const void *unused)
+static int config_set_element_cmp(const void *unused_cmp_data,
+                                 const struct config_set_element *e1,
+                                 const struct config_set_element *e2,
+                                 const void *unused_keydata)
 {
        return strcmp(e1->key, e2->key);
 }
 
 void git_configset_init(struct config_set *cs)
 {
-       hashmap_init(&cs->config_hash, (hashmap_cmp_fn)config_set_element_cmp, 0);
+       hashmap_init(&cs->config_hash, (hashmap_cmp_fn)config_set_element_cmp,
+                    NULL, 0);
        cs->hash_initialized = 1;
        cs->list.nr = 0;
        cs->list.alloc = 0;