diff options
author | Colin Walters <walters@verbum.org> | 2018-02-08 16:33:18 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-12 19:03:18 +0000 |
commit | 0041a7a1ed8173a6497429520ed06e981703625c (patch) | |
tree | 65343912a72d807468c0c6fe20d7a2d6cba1093c /src/libostree/ostree-core.h | |
parent | 5848de93a4346ad3c49d907ced7612578781f5e8 (diff) | |
download | ostree-0041a7a1ed8173a6497429520ed06e981703625c.tar.gz |
core: Add API (and standard concept for) content checksum
There are a few cases for knowing whether a commit has identical
content to another commit. Some people want to do a "promotion workflow",
where the content of a commit on a tesitng branch is then "promoted"
to a production branch with `ostree commit --tree=ref`.
Another use case I just hit in rpm-ostree deals with
[jigdo](https://github.com/projectatomic/rpm-ostree/issues/1081) where we're
importing RPMs on both the client and server, and will be using the
content checksum, since the client/server cases inject different metadata
into the commit object.
Closes: https://github.com/ostreedev/ostree/issues/1315
Closes: #1449
Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-core.h')
-rw-r--r-- | src/libostree/ostree-core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h index d38175f3..018f5070 100644 --- a/src/libostree/ostree-core.h +++ b/src/libostree/ostree-core.h @@ -521,6 +521,9 @@ _OSTREE_PUBLIC guint64 ostree_commit_get_timestamp (GVariant *commit_variant); _OSTREE_PUBLIC +gchar * ostree_commit_get_content_checksum (GVariant *commit_variant); + +_OSTREE_PUBLIC gboolean ostree_check_version (guint required_year, guint required_release); G_END_DECLS |