test-read-graph: include extra post-parse info
It can be helpful to verify that the 'struct commit_graph' that results from parsing a commit-graph is correctly structured. The existence of different chunks is not enough to verify that all of the optional features are correctly enabled. Update 'test-tool read-graph' to output an "options:" line that includes information for different parts of the struct commit_graph. In particular, this change demonstrates that the read_generation_data option is never being enabled, which will be fixed in a later change. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4c53a8c20f
commit
c78c7a959c
@ -3,6 +3,7 @@
|
||||
#include "commit-graph.h"
|
||||
#include "repository.h"
|
||||
#include "object-store.h"
|
||||
#include "bloom.h"
|
||||
|
||||
int cmd__read_graph(int argc, const char **argv)
|
||||
{
|
||||
@ -45,6 +46,18 @@ int cmd__read_graph(int argc, const char **argv)
|
||||
printf(" bloom_data");
|
||||
printf("\n");
|
||||
|
||||
printf("options:");
|
||||
if (graph->bloom_filter_settings)
|
||||
printf(" bloom(%"PRIu32",%"PRIu32",%"PRIu32")",
|
||||
graph->bloom_filter_settings->hash_version,
|
||||
graph->bloom_filter_settings->bits_per_entry,
|
||||
graph->bloom_filter_settings->num_hashes);
|
||||
if (graph->read_generation_data)
|
||||
printf(" read_generation_data");
|
||||
if (graph->topo_levels)
|
||||
printf(" topo_levels");
|
||||
printf("\n");
|
||||
|
||||
UNLEAK(graph);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user