]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pack-bitmap.c
Merge branch 'ab/config-multi-and-nonbool'
[thirdparty/git.git] / pack-bitmap.c
index d2a42abf28cc7246b3d076b1c855a350edcded70..f8ab6be411d4dad3e37cb96acbff476ba7579441 100644 (file)
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "alloc.h"
 #include "commit.h"
+#include "hex.h"
 #include "strbuf.h"
 #include "tag.h"
 #include "diff.h"
@@ -951,7 +953,8 @@ static void show_object(struct object *object, const char *name, void *data_)
        bitmap_set(data->base, bitmap_pos);
 }
 
-static void show_commit(struct commit *commit, void *data)
+static void show_commit(struct commit *commit UNUSED,
+                       void *data UNUSED)
 {
 }
 
@@ -1940,7 +1943,8 @@ static void test_bitmap_type(struct bitmap_test_data *tdata,
                    type_name(bitmap_type));
 }
 
-static void test_show_object(struct object *object, const char *name,
+static void test_show_object(struct object *object,
+                            const char *name UNUSED,
                             void *data)
 {
        struct bitmap_test_data *tdata = data;
@@ -2314,7 +2318,11 @@ int bitmap_is_midx(struct bitmap_index *bitmap_git)
 
 const struct string_list *bitmap_preferred_tips(struct repository *r)
 {
-       return repo_config_get_value_multi(r, "pack.preferbitmaptips");
+       const struct string_list *dest;
+
+       if (!repo_config_get_string_multi(r, "pack.preferbitmaptips", &dest))
+               return dest;
+       return NULL;
 }
 
 int bitmap_is_preferred_refname(struct repository *r, const char *refname)