summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-core.c
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-01-29 14:14:29 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-29 18:21:00 +0000
commit785da8d5a632b12f94c93e78f2751c14e6a777ba (patch)
tree71793d6c620d8ac1e6a372182cdf7de15cf5877f /src/libostree/ostree-core.c
parent794d1d98d6328c5fad174d6b409f4f1692e338cf (diff)
downloadostree-785da8d5a632b12f94c93e78f2751c14e6a777ba.tar.gz
lib/core: Expand documentation for ostree_parse_refspec()
The old documentation had outdated and incomplete annotations, and didn’t make it very clear that out_remote could legitimately return NULL. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1437 Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-core.c')
-rw-r--r--src/libostree/ostree-core.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 2256a2c0..2f633dcb 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -152,15 +152,18 @@ ostree_validate_checksum_string (const char *sha256,
/**
* ostree_parse_refspec:
* @refspec: A "refspec" string
- * @out_remote: (out) (allow-none): The remote name, or %NULL if the refspec refs to a local ref
- * @out_ref: (out) (allow-none): Name of ref
+ * @out_remote: (out) (nullable) (optional): Return location for the remote name,
+ * or %NULL if the refspec refs to a local ref
+ * @out_ref: (out) (not nullable) (optional): Return location for the ref name
* @error: Error
*
- * Split a refspec like "gnome-ostree:gnome-ostree/buildmaster" into
- * two parts; @out_remote will be set to "gnome-ostree", and @out_ref
- * will be "gnome-ostree/buildmaster".
+ * Split a refspec like `gnome-ostree:gnome-ostree/buildmaster` or just
+ * `gnome-ostree/buildmaster` into two parts. In the first case, @out_remote
+ * will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmaster`.
+ * In the second case (a local ref), @out_remote will be %NULL, and @out_ref
+ * will be `gnome-ostree/buildmaster`. In both cases, %TRUE will be returned.
*
- * If @refspec refers to a local ref, @out_remote will be %NULL.
+ * Returns: %TRUE on successful parsing, %FALSE otherwise
*/
gboolean
ostree_parse_refspec (const char *refspec,