summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-refs.c
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2017-08-21 17:08:12 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2017-08-24 19:57:33 +0000
commit7ed881baa75192521fa972fa702c66470dc0a225 (patch)
tree7a9894b29017f040486928c215e65a860b229bd4 /src/ostree/ot-builtin-refs.c
parent95bac299e54020e6cc795b126deefc8c2c7820f4 (diff)
downloadostree-7ed881baa75192521fa972fa702c66470dc0a225.tar.gz
lib/repo-refs: Include remote refs when using collections
When working with collections it can be useful to see remote refs rather than just local and mirrored ones. This commit changes the "ostree refs -c" output to include remote refs, and includes remote refs with collection IDs in summary file generation as well. The former behavior is consistent with how "ostree refs" works, and the latter behavior is useful in facilitating P2P updates even when mirrors haven't been configured. To accomplish this, OstreeRepoListRefsExtFlags was extended with an EXCLUDE_REMOTES flag. This was done rather than an INCLUDE_REMOTES flag so that existing calls to ostree_repo_list_refs_ext continue to have the same behavior. This flag was added to ostree_repo_list_collection_refs (which is an experimental API break). Also, add unit tests for the "refs -c" and summary file behavior, and update relevant tests. Closes: #1069 Approved by: cgwalters
Diffstat (limited to 'src/ostree/ot-builtin-refs.c')
-rw-r--r--src/ostree/ot-builtin-refs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c
index ead4ba48..3742f050 100644
--- a/src/ostree/ot-builtin-refs.c
+++ b/src/ostree/ot-builtin-refs.c
@@ -64,7 +64,8 @@ do_ref_with_collections (OstreeRepo *repo,
if (!ostree_repo_list_collection_refs (repo,
(!opt_create) ? refspec_prefix : NULL,
- &refs, cancellable, error))
+ &refs, OSTREE_REPO_LIST_REFS_EXT_NONE,
+ cancellable, error))
goto out;
if (!opt_delete && !opt_create)