From 5ddca0fc362b3614539426ca4c3310dd29ffa9f0 Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Fri, 2 Nov 2018 17:20:11 -0700 Subject: [PATCH] common: Document that get_latest_commit() can return NULL It's possible for the "latest_commit" field of a FlatpakInstalledRef to be NULL, which I think happens if the ref is no longer in the remote.[1][2][3] So this commit documents the possibility of flatpak_installed_ref_get_latest_commit() returning NULL. [1] https://github.com/flatpak/flatpak/issues/309 [2] https://github.com/flatpak/flatpak/commit/6b4402b60 [3] https://github.com/flatpak/flatpak/commit/230e18db7 Closes: #2289 Approved by: matthiasclasen --- common/flatpak-installed-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/flatpak-installed-ref.c b/common/flatpak-installed-ref.c index 528a51f5..38ad0929 100644 --- a/common/flatpak-installed-ref.c +++ b/common/flatpak-installed-ref.c @@ -280,7 +280,7 @@ flatpak_installed_ref_get_origin (FlatpakInstalledRef *self) * * Gets the latest commit of the ref. * - * Returns: (transfer none): the latest commit + * Returns: (transfer none) (nullable): the latest commit */ const char * flatpak_installed_ref_get_latest_commit (FlatpakInstalledRef *self)