]> git.ipfire.org Git - thirdparty/git.git/blobdiff - blame.c
strmap: enable allocations to come from a mem_pool
[thirdparty/git.git] / blame.c
diff --git a/blame.c b/blame.c
index b475bfa1c042138671dd5fc82622e90c17504197..229beb6452bdcf1a640d3c5f023cd5175b378871 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -435,7 +435,7 @@ static void get_fingerprint(struct fingerprint *result,
 
 static void free_fingerprint(struct fingerprint *f)
 {
-       hashmap_free(&f->map);
+       hashmap_clear(&f->map);
        free(f->entries);
 }
 
@@ -1276,7 +1276,7 @@ static int maybe_changed_path(struct repository *r,
        if (commit_graph_generation(origin->commit) == GENERATION_NUMBER_INFINITY)
                return 1;
 
-       filter = get_bloom_filter(r, origin->commit, 0);
+       filter = get_bloom_filter(r, origin->commit);
 
        if (!filter)
                return 1;
@@ -2892,16 +2892,18 @@ void setup_blame_bloom_data(struct blame_scoreboard *sb,
                            const char *path)
 {
        struct blame_bloom_data *bd;
+       struct bloom_filter_settings *bs;
 
        if (!sb->repo->objects->commit_graph)
                return;
 
-       if (!sb->repo->objects->commit_graph->bloom_filter_settings)
+       bs = get_bloom_filter_settings(sb->repo);
+       if (!bs)
                return;
 
        bd = xmalloc(sizeof(struct blame_bloom_data));
 
-       bd->settings = sb->repo->objects->commit_graph->bloom_filter_settings;
+       bd->settings = bs;
 
        bd->alloc = 4;
        bd->nr = 0;