ostree-test also handle dirtree and summary

This commit is contained in:
Alexander Larsson
2020-01-13 15:35:23 +01:00
parent b8959d4ff6
commit 8dac5ebb4b

View File

@@ -19,6 +19,18 @@ handle (char *filename)
g_autofree char *s = ot_commit_ref_print (commit, TRUE);
g_print ("%s: %s\n", filename, s);
}
else if (g_str_has_suffix (filename, ".dirtree"))
{
OtTreeMetaRef tree = ot_tree_meta_ref_from_data (contents, size);
g_autofree char *s = ot_tree_meta_ref_print (tree, TRUE);
g_print ("%s: %s\n", filename, s);
}
else if (g_str_has_suffix (filename, "summary"))
{
OtSummaryRef summary = ot_summary_ref_from_data (contents, size);
g_autofree char *s = ot_summary_ref_print (summary, TRUE);
g_print ("%s: %s\n", filename, s);
}
else
{
g_print ("Unknown type %s\n", filename);