diff options
author | James Antill <james@and.org> | 2014-10-22 01:23:49 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-10-23 10:21:17 -0400 |
commit | aab6e7bdf26f2a51e4d5bb9cd423443ec8748a93 (patch) | |
tree | cc525824657ffcbe69140841d81b2e29e533c821 | |
parent | 52c0d89a8cd53cfec20041fa0e1a4fe382a1a2d2 (diff) | |
download | ostree-aab6e7bdf26f2a51e4d5bb9cd423443ec8748a93.tar.gz |
dump: Print the version when dumping a commit, log/show/etc.
-rw-r--r-- | src/ostree/ot-dump.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c index bb1f9824..a9fb623f 100644 --- a/src/ostree/ot-dump.c +++ b/src/ostree/ot-dump.c @@ -26,6 +26,7 @@ #include "ot-dump.h" #include "otutil.h" +#include "ot-admin-functions.h" void ot_dump_variant (GVariant *variant) @@ -92,6 +93,7 @@ dump_commit (GVariant *variant, const gchar *body; guint64 timestamp; gs_free gchar *str = NULL; + gs_free gchar *version = NULL; /* See OSTREE_COMMIT_GVARIANT_FORMAT */ g_variant_get (variant, "(a{sv}aya(say)&s&stayay)", NULL, NULL, NULL, @@ -102,6 +104,11 @@ dump_commit (GVariant *variant, if (str) g_print ("Date: %s\n", str); + if ((version = ot_admin_checksum_version (variant))) + { + g_print ("Version: %s\n", version); + } + g_print ("\n"); dump_indented_lines (subject); |