diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-04 21:54:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 21:54:28 +0200 |
commit | 1dedc69a46d3d43d098beb6255ef383a6acc33fa (patch) | |
tree | df2f9c1c14f385595412ead8100061a2b5352a42 /src/ostree | |
parent | 9832a36a8c51a479ace60890be0a9f3893292cfb (diff) | |
parent | 512b4e63132869f62c007954ee6beee98f4d7228 (diff) | |
download | ostree-1dedc69a46d3d43d098beb6255ef383a6acc33fa.tar.gz |
Merge pull request #2159 from agners/show-parent
Show commit checksum of parent, if present
Diffstat (limited to 'src/ostree')
-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 38f3730b..225d1845 100644 --- a/src/ostree/ot-dump.c +++ b/src/ostree/ot-dump.c @@ -114,6 +114,7 @@ dump_commit (GVariant *variant, const gchar *subject; const gchar *body; guint64 timestamp; + g_autofree char *parent = NULL; g_autofree char *str = NULL; g_autofree char *version = NULL; g_autoptr(GError) local_error = NULL; @@ -129,6 +130,12 @@ dump_commit (GVariant *variant, g_assert (local_error); /* Pacify static analysis */ errx (1, "Failed to read commit: %s", local_error->message); } + + if ((parent = ostree_commit_get_parent(variant))) + { + g_print ("Parent: %s\n", parent); + } + g_autofree char *contents = ostree_commit_get_content_checksum (variant) ?: "<invalid commit>"; g_print ("ContentChecksum: %s\n", contents); g_print ("Date: %s\n", str); |