Use ostree_commit_get_parent in ost_get_prev_commit.

This commit is contained in:
James Antill 2014-07-17 23:54:50 -04:00
parent 634541f722
commit 23ad6c0310

View File

@ -633,11 +633,8 @@ ost_get_prev_commit(OstreeRepo *repo, char *checksum)
if (!ostree_repo_load_variant (repo, OSTREE_OBJECT_TYPE_COMMIT, checksum, if (!ostree_repo_load_variant (repo, OSTREE_OBJECT_TYPE_COMMIT, checksum,
&commit, &tmp_error)) &commit, &tmp_error))
goto out; goto out;
g_variant_get_child (commit, 1, "@ay", &parent_csum_v); ret = ostree_commit_get_parent (commit);
if (g_variant_n_children (parent_csum_v) == 0)
goto out;
ret = ostree_checksum_from_bytes_v (parent_csum_v);
out: out:
g_clear_error (&tmp_error); g_clear_error (&tmp_error);