Add _ostree_repo_mode_is_bare helper

This cleans up some existing code, but it also allows us to later
add new bare modes.

Closes: #750
Approved by: cgwalters
This commit is contained in:
Alexander Larsson authored and Atomic Bot committed 2017-03-27 13:48:41 +00:00
1 parent 455cc5e892
commit 612150f143
4 files changed
+13 -7

No files matched your search

+8
View File
@@ -139,6 +139,14 @@ _ostree_loose_path (char *buf,
#define _OSTREE_METADATA_GPGSIGS_NAME "ostree.gpgsigs"
#define _OSTREE_METADATA_GPGSIGS_TYPE G_VARIANT_TYPE ("aay")
static inline gboolean
_ostree_repo_mode_is_bare (OstreeRepoMode mode)
{
return
mode == OSTREE_REPO_MODE_BARE ||
mode == OSTREE_REPO_MODE_BARE_USER;
}
GVariant *
_ostree_detached_metadata_append_gpg_sig (GVariant *existing_metadata,
GBytes *signature_bytes);