summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-refs.c
diff options
context:
space:
mode:
authorRuixin Bao <peter.bao@mail.utoronto.ca>2017-10-17 17:25:04 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2017-10-20 12:59:33 +0000
commit298c151fd8f78e6c3f6f199cd32981ae3d311828 (patch)
tree596d088bc885b26d540d5bdb91ba89aa7b20c5b4 /src/ostree/ot-builtin-refs.c
parent3c360a720ff1a8bf695365a79b3ac7975ffd25e8 (diff)
downloadostree-298c151fd8f78e6c3f6f199cd32981ae3d311828.tar.gz
ostree: move flags into command struct, pass down through builtins
This is a similar approach as https://github.com/projectatomic/rpm-ostree/commit/12c34bb2491a07079c911ef26401fee939e5573c. One thing to note is when we parse the admin related functions, we still keep the old admin related flags, and added a new parameter to represent the command struct. This allows us to identify the caller of the function, making it easier for us to possibly deduplicate the subcommand handling in the future. A similar approach is done in rpm-ostree: https://github.com/projectatomic/rpm-ostree/commit/83aeb018c1012c7a43783c09b74ec71bc9c45826 This also makes it easier for us to change the prototype of the function. If we want to add something new in the future, we won't need to touch every prototype. Closes: #1267 Approved by: cgwalters
Diffstat (limited to 'src/ostree/ot-builtin-refs.c')
-rw-r--r--src/ostree/ot-builtin-refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c
index 1b4ead7d..68befc74 100644
--- a/src/ostree/ot-builtin-refs.c
+++ b/src/ostree/ot-builtin-refs.c
@@ -261,7 +261,7 @@ static gboolean do_ref (OstreeRepo *repo, const char *refspec_prefix, GCancellab
}
gboolean
-ostree_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **error)
+ostree_builtin_refs (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
gboolean ret = FALSE;
g_autoptr(GOptionContext) context = NULL;
@@ -270,7 +270,7 @@ ostree_builtin_refs (int argc, char **argv, GCancellable *cancellable, GError **
context = g_option_context_new ("[PREFIX] - List refs");
- if (!ostree_option_context_parse (context, options, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error))
+ if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
if (argc >= 2)