diff options
author | Colin Walters <walters@verbum.org> | 2021-08-25 15:18:43 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2021-08-25 21:29:51 -0400 |
commit | 3e30e72d337109eb64ae662ef4ebacd5453d3268 (patch) | |
tree | 32fac0b60c9b3a20f6010c1d5bd3815074f43563 | |
parent | 30909a28f2aff54b615837a184f53509cbccc381 (diff) | |
download | ostree-3e30e72d337109eb64ae662ef4ebacd5453d3268.tar.gz |
lib: Change read_commit_detached_metadata to be nullable
Hit this while working on some Rust code.
-rw-r--r-- | src/libostree/ostree-repo-commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index d5ab57a2..8dc2355e 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -3117,7 +3117,7 @@ ostree_repo_write_commit_with_time (OstreeRepo *self, * ostree_repo_read_commit_detached_metadata: * @self: Repo * @checksum: ASCII SHA256 commit checksum - * @out_metadata: (out) (transfer full): Metadata associated with commit in with format "a{sv}", or %NULL if none exists + * @out_metadata: (out) (nullable) (transfer full): Metadata associated with commit in with format "a{sv}", or %NULL if none exists * @cancellable: Cancellable * @error: Error * @@ -3132,6 +3132,8 @@ ostree_repo_read_commit_detached_metadata (OstreeRepo *self, GCancellable *cancellable, GError **error) { + g_assert (out_metadata != NULL); + char buf[_OSTREE_LOOSE_PATH_MAX]; _ostree_loose_path (buf, checksum, OSTREE_OBJECT_TYPE_COMMIT_META, self->mode); |