pack-bitmap: switch hash tables to use struct object_id
[gitweb.git] / builtin / commit-graph.c
index 22b974f4b434913cf3ebe9e4073d2cb847f8a468..4ae502754c292d0e743ed8fbfdf9d5dda00d1dba 100644 (file)
@@ -64,6 +64,7 @@ static int graph_verify(int argc, const char **argv)
        if (!graph)
                return 0;
 
+       UNLEAK(graph);
        return verify_commit_graph(the_repository, graph);
 }
 
@@ -89,10 +90,8 @@ static int graph_read(int argc, const char **argv)
        graph_name = get_commit_graph_filename(opts.obj_dir);
        graph = load_commit_graph_one(graph_name);
 
-       if (!graph) {
-               UNLEAK(graph_name);
+       if (!graph)
                die("graph file %s does not exist", graph_name);
-       }
 
        FREE_AND_NULL(graph_name);
 
@@ -111,11 +110,11 @@ static int graph_read(int argc, const char **argv)
                printf(" oid_lookup");
        if (graph->chunk_commit_data)
                printf(" commit_metadata");
-       if (graph->chunk_large_edges)
-               printf(" large_edges");
+       if (graph->chunk_extra_edges)
+               printf(" extra_edges");
        printf("\n");
 
-       free_commit_graph(graph);
+       UNLEAK(graph);
 
        return 0;
 }
@@ -170,6 +169,8 @@ static int graph_write(int argc, const char **argv)
                        pack_indexes = &lines;
                if (opts.stdin_commits)
                        commit_hex = &lines;
+
+               UNLEAK(buf);
        }
 
        write_commit_graph(opts.obj_dir,
@@ -178,7 +179,7 @@ static int graph_write(int argc, const char **argv)
                           opts.append,
                           1);
 
-       string_list_clear(&lines, 0);
+       UNLEAK(lines);
        return 0;
 }