summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ostree/main.c2
-rw-r--r--src/ostree/ot-admin-builtin-cleanup.c2
-rw-r--r--src/ostree/ot-admin-builtin-deploy.c2
-rw-r--r--src/ostree/ot-admin-builtin-diff.c2
-rw-r--r--src/ostree/ot-admin-builtin-init-fs.c2
-rw-r--r--src/ostree/ot-admin-builtin-os-init.c2
-rw-r--r--src/ostree/ot-admin-builtin-status.c2
-rw-r--r--src/ostree/ot-admin-builtin-switch.c2
-rw-r--r--src/ostree/ot-admin-builtin-undeploy.c2
-rw-r--r--src/ostree/ot-admin-builtin-unlock.c2
-rw-r--r--src/ostree/ot-admin-builtin-upgrade.c2
-rw-r--r--src/ostree/ot-admin-instutil-builtin-grub2-generate.c2
-rw-r--r--src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c2
-rw-r--r--src/ostree/ot-admin-instutil-builtin-set-kargs.c2
-rw-r--r--src/ostree/ot-builtin-cat.c2
-rw-r--r--src/ostree/ot-builtin-checkout.c2
-rw-r--r--src/ostree/ot-builtin-checksum.c2
-rw-r--r--src/ostree/ot-builtin-commit.c2
-rw-r--r--src/ostree/ot-builtin-config.c2
-rw-r--r--src/ostree/ot-builtin-create-usb.c2
-rw-r--r--src/ostree/ot-builtin-diff.c2
-rw-r--r--src/ostree/ot-builtin-export.c2
-rw-r--r--src/ostree/ot-builtin-find-remotes.c2
-rw-r--r--src/ostree/ot-builtin-fsck.c2
-rw-r--r--src/ostree/ot-builtin-gpg-sign.c2
-rw-r--r--src/ostree/ot-builtin-init.c2
-rw-r--r--src/ostree/ot-builtin-log.c2
-rw-r--r--src/ostree/ot-builtin-ls.c2
-rw-r--r--src/ostree/ot-builtin-prune.c2
-rw-r--r--src/ostree/ot-builtin-pull-local.c2
-rw-r--r--src/ostree/ot-builtin-pull.c2
-rw-r--r--src/ostree/ot-builtin-refs.c2
-rw-r--r--src/ostree/ot-builtin-reset.c2
-rw-r--r--src/ostree/ot-builtin-rev-parse.c2
-rw-r--r--src/ostree/ot-builtin-show.c2
-rw-r--r--src/ostree/ot-builtin-static-delta.c10
-rw-r--r--src/ostree/ot-builtin-summary.c2
-rw-r--r--src/ostree/ot-main.c27
-rw-r--r--src/ostree/ot-remote-builtin-add-cookie.c2
-rw-r--r--src/ostree/ot-remote-builtin-add.c2
-rw-r--r--src/ostree/ot-remote-builtin-delete-cookie.c2
-rw-r--r--src/ostree/ot-remote-builtin-delete.c2
-rw-r--r--src/ostree/ot-remote-builtin-gpg-import.c2
-rw-r--r--src/ostree/ot-remote-builtin-list-cookies.c2
-rw-r--r--src/ostree/ot-remote-builtin-list.c2
-rw-r--r--src/ostree/ot-remote-builtin-refs.c2
-rw-r--r--src/ostree/ot-remote-builtin-show-url.c2
-rw-r--r--src/ostree/ot-remote-builtin-summary.c2
48 files changed, 77 insertions, 52 deletions
diff --git a/src/ostree/main.c b/src/ostree/main.c
index 4ae261d6..d50c2490 100644
--- a/src/ostree/main.c
+++ b/src/ostree/main.c
@@ -39,7 +39,7 @@ static OstreeCommand commands[] = {
*/
{ "admin", OSTREE_BUILTIN_FLAG_NO_REPO,
ostree_builtin_admin,
- "Commands that needs admin privilege" },
+ "Commands for managing a host system booted with ostree" },
{ "cat", OSTREE_BUILTIN_FLAG_NONE,
ostree_builtin_cat,
"Concatenate contents of files"},
diff --git a/src/ostree/ot-admin-builtin-cleanup.c b/src/ostree/ot-admin-builtin-cleanup.c
index bc7a724b..996afd24 100644
--- a/src/ostree/ot-admin-builtin-cleanup.c
+++ b/src/ostree/ot-admin-builtin-cleanup.c
@@ -44,7 +44,7 @@ ot_admin_builtin_cleanup (int argc, char **argv, OstreeCommandInvocation *invoca
g_autoptr(OstreeSysroot) sysroot = NULL;
gboolean ret = FALSE;
- context = g_option_context_new ("Delete untagged deployments and repository objects");
+ context = g_option_context_new ("");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c
index 6bfc09ee..ae287939 100644
--- a/src/ostree/ot-admin-builtin-deploy.c
+++ b/src/ostree/ot-admin-builtin-deploy.c
@@ -65,7 +65,7 @@ ot_admin_builtin_deploy (int argc, char **argv, OstreeCommandInvocation *invocat
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
g_autoptr(GOptionContext) context =
- g_option_context_new ("REFSPEC - Checkout revision REFSPEC as the new default deployment");
+ g_option_context_new ("REFSPEC");
g_autoptr(OstreeSysroot) sysroot = NULL;
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
diff --git a/src/ostree/ot-admin-builtin-diff.c b/src/ostree/ot-admin-builtin-diff.c
index ec8f692e..fe0c5365 100644
--- a/src/ostree/ot-admin-builtin-diff.c
+++ b/src/ostree/ot-admin-builtin-diff.c
@@ -54,7 +54,7 @@ ot_admin_builtin_diff (int argc, char **argv, OstreeCommandInvocation *invocatio
g_autoptr(GFile) orig_etc_path = NULL;
g_autoptr(GFile) new_etc_path = NULL;
- context = g_option_context_new ("Diff current /etc configuration versus default");
+ context = g_option_context_new ("");
g_option_context_add_main_entries (context, options, NULL);
diff --git a/src/ostree/ot-admin-builtin-init-fs.c b/src/ostree/ot-admin-builtin-init-fs.c
index e1c0e439..e2bee8a3 100644
--- a/src/ostree/ot-admin-builtin-init-fs.c
+++ b/src/ostree/ot-admin-builtin-init-fs.c
@@ -40,7 +40,7 @@ static GOptionEntry options[] = {
gboolean
ot_admin_builtin_init_fs (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("PATH - Initialize a root filesystem");
+ g_autoptr(GOptionContext) context = g_option_context_new ("PATH");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER |
diff --git a/src/ostree/ot-admin-builtin-os-init.c b/src/ostree/ot-admin-builtin-os-init.c
index a6a11f99..92dc54fb 100644
--- a/src/ostree/ot-admin-builtin-os-init.c
+++ b/src/ostree/ot-admin-builtin-os-init.c
@@ -45,7 +45,7 @@ ot_admin_builtin_os_init (int argc, char **argv, OstreeCommandInvocation *invoca
gboolean ret = FALSE;
const char *osname = NULL;
- context = g_option_context_new ("OSNAME - Initialize empty state for given operating system");
+ context = g_option_context_new ("OSNAME");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c
index b88c2fba..b763618c 100644
--- a/src/ostree/ot-admin-builtin-status.c
+++ b/src/ostree/ot-admin-builtin-status.c
@@ -100,7 +100,7 @@ ot_admin_builtin_status (int argc, char **argv, OstreeCommandInvocation *invocat
const char *red_bold_suffix = is_tty ? "\x1b[22m\x1b[0m" : "";
guint i;
- context = g_option_context_new ("List deployments");
+ context = g_option_context_new ("");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c
index 1b1082d5..fded7aa2 100644
--- a/src/ostree/ot-admin-builtin-switch.c
+++ b/src/ostree/ot-admin-builtin-switch.c
@@ -47,7 +47,7 @@ gboolean
ot_admin_builtin_switch (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context =
- g_option_context_new ("REF - Construct new tree from REF and deploy it");
+ g_option_context_new ("REF");
g_autoptr(OstreeSysroot) sysroot = NULL;
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
diff --git a/src/ostree/ot-admin-builtin-undeploy.c b/src/ostree/ot-admin-builtin-undeploy.c
index 3bddd6cb..57fc8d61 100644
--- a/src/ostree/ot-admin-builtin-undeploy.c
+++ b/src/ostree/ot-admin-builtin-undeploy.c
@@ -46,7 +46,7 @@ ot_admin_builtin_undeploy (int argc, char **argv, OstreeCommandInvocation *invoc
g_autoptr(GPtrArray) current_deployments = NULL;
g_autoptr(OstreeDeployment) target_deployment = NULL;
- context = g_option_context_new ("INDEX - Delete deployment INDEX");
+ context = g_option_context_new ("INDEX");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
diff --git a/src/ostree/ot-admin-builtin-unlock.c b/src/ostree/ot-admin-builtin-unlock.c
index cb3598fd..60b1209b 100644
--- a/src/ostree/ot-admin-builtin-unlock.c
+++ b/src/ostree/ot-admin-builtin-unlock.c
@@ -51,7 +51,7 @@ ot_admin_builtin_unlock (int argc, char **argv, OstreeCommandInvocation *invocat
OstreeDeployment *booted_deployment = NULL;
OstreeDeploymentUnlockedState target_state;
- context = g_option_context_new ("Make the current deployment mutable (as a hotfix or development)");
+ context = g_option_context_new ("");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER,
diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c
index c0542f3e..225811eb 100644
--- a/src/ostree/ot-admin-builtin-upgrade.c
+++ b/src/ostree/ot-admin-builtin-upgrade.c
@@ -56,7 +56,7 @@ static GOptionEntry options[] = {
gboolean
ot_admin_builtin_upgrade (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("Construct new tree from current origin and deploy it, if it changed");
+ g_autoptr(GOptionContext) context = g_option_context_new ("");
g_autoptr(OstreeSysroot) sysroot = NULL;
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
diff --git a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
index a7eb0d4f..df9d804b 100644
--- a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
+++ b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c
@@ -45,7 +45,7 @@ ot_admin_instutil_builtin_grub2_generate (int argc, char **argv, OstreeCommandIn
g_autoptr(GOptionContext) context = NULL;
g_autoptr(OstreeSysroot) sysroot = NULL;
- context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
+ context = g_option_context_new ("[BOOTVERSION]");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
diff --git a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
index ca3fab17..3b546711 100644
--- a/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
+++ b/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
@@ -196,7 +196,7 @@ ot_admin_instutil_builtin_selinux_ensure_labeled (int argc, char **argv, OstreeC
g_autoptr(OstreeSysroot) sysroot = NULL;
g_autoptr(GFile) deployment_path = NULL;
- context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");
+ context = g_option_context_new ("[SUBPATH PREFIX]");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
diff --git a/src/ostree/ot-admin-instutil-builtin-set-kargs.c b/src/ostree/ot-admin-instutil-builtin-set-kargs.c
index 7419581c..c1c41871 100644
--- a/src/ostree/ot-admin-instutil-builtin-set-kargs.c
+++ b/src/ostree/ot-admin-instutil-builtin-set-kargs.c
@@ -58,7 +58,7 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat
g_autoptr(OstreeSysroot) sysroot = NULL;
__attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *kargs = NULL;
- context = g_option_context_new ("ARGS - set new kernel command line arguments");
+ context = g_option_context_new ("ARGS");
if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER | OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
diff --git a/src/ostree/ot-builtin-cat.c b/src/ostree/ot-builtin-cat.c
index 88bd4fdb..ff45c24a 100644
--- a/src/ostree/ot-builtin-cat.c
+++ b/src/ostree/ot-builtin-cat.c
@@ -57,7 +57,7 @@ cat_one_file (GFile *f,
gboolean
ostree_builtin_cat (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("COMMIT PATH... - Concatenate contents of files");
+ g_autoptr(GOptionContext) context = g_option_context_new ("COMMIT PATH...");
g_autoptr(OstreeRepo) repo = NULL;
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
return FALSE;
diff --git a/src/ostree/ot-builtin-checkout.c b/src/ostree/ot-builtin-checkout.c
index 79718c9c..ea21aaac 100644
--- a/src/ostree/ot-builtin-checkout.c
+++ b/src/ostree/ot-builtin-checkout.c
@@ -288,7 +288,7 @@ ostree_builtin_checkout (int argc, char **argv, OstreeCommandInvocation *invocat
const char *destination;
g_autofree char *resolved_commit = NULL;
- context = g_option_context_new ("COMMIT [DESTINATION] - Check out a commit into a filesystem tree");
+ context = g_option_context_new ("COMMIT [DESTINATION]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-checksum.c b/src/ostree/ot-builtin-checksum.c
index 24689ac6..b2a5c5a6 100644
--- a/src/ostree/ot-builtin-checksum.c
+++ b/src/ostree/ot-builtin-checksum.c
@@ -69,7 +69,7 @@ gboolean
ostree_builtin_checksum (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
g_autoptr(GOptionContext) context =
- g_option_context_new ("PATH - Checksum a file or directory");
+ g_option_context_new ("PATH");
if (!ostree_option_context_parse (context, options, &argc, &argv,
invocation, NULL, cancellable, error))
return FALSE;
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index 7df1dfe1..a8eb79aa 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -431,7 +431,7 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
struct CommitFilterData filter_data = { 0, };
g_autofree char *commit_body = NULL;
- context = g_option_context_new ("[PATH] - Commit a new revision");
+ context = g_option_context_new ("[PATH]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-config.c b/src/ostree/ot-builtin-config.c
index 94e36465..0fabaefd 100644
--- a/src/ostree/ot-builtin-config.c
+++ b/src/ostree/ot-builtin-config.c
@@ -68,7 +68,7 @@ ostree_builtin_config (int argc, char **argv, OstreeCommandInvocation *invocatio
g_autofree char *key = NULL;
GKeyFile *config = NULL;
- context = g_option_context_new ("(get KEY|set KEY VALUE) - Change repo configuration settings");
+ context = g_option_context_new ("(get KEY|set KEY VALUE)");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-create-usb.c b/src/ostree/ot-builtin-create-usb.c
index fcde36c0..6a540c96 100644
--- a/src/ostree/ot-builtin-create-usb.c
+++ b/src/ostree/ot-builtin-create-usb.c
@@ -51,7 +51,7 @@ ostree_builtin_create_usb (int argc,
g_autoptr(OstreeAsyncProgress) progress = NULL;
g_auto(GLnxConsoleRef) console = { 0, };
- context = g_option_context_new ("MOUNT-PATH COLLECTION-ID REF [COLLECTION-ID REF...] - Copy the refs to a USB stick");
+ context = g_option_context_new ("MOUNT-PATH COLLECTION-ID REF [COLLECTION-ID REF...]");
/* Parse options. */
g_autoptr(OstreeRepo) src_repo = NULL;
diff --git a/src/ostree/ot-builtin-diff.c b/src/ostree/ot-builtin-diff.c
index 9cd7141b..5f5a4dcd 100644
--- a/src/ostree/ot-builtin-diff.c
+++ b/src/ostree/ot-builtin-diff.c
@@ -140,7 +140,7 @@ ostree_builtin_diff (int argc, char **argv, OstreeCommandInvocation *invocation,
g_autoptr(GPtrArray) removed = NULL;
g_autoptr(GPtrArray) added = NULL;
- context = g_option_context_new ("REV TARGETDIR - Compare directory TARGETDIR against revision REV");
+ context = g_option_context_new ("REV TARGETDIR");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-export.c b/src/ostree/ot-builtin-export.c
index 83656d04..ca85301e 100644
--- a/src/ostree/ot-builtin-export.c
+++ b/src/ostree/ot-builtin-export.c
@@ -77,7 +77,7 @@ ostree_builtin_export (int argc, char **argv, OstreeCommandInvocation *invocatio
OstreeRepoExportArchiveOptions opts = { 0, };
#endif
- context = g_option_context_new ("COMMIT - Stream COMMIT to stdout in tar format");
+ context = g_option_context_new ("COMMIT");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-find-remotes.c b/src/ostree/ot-builtin-find-remotes.c
index 3cf6c153..b15bce8d 100644
--- a/src/ostree/ot-builtin-find-remotes.c
+++ b/src/ostree/ot-builtin-find-remotes.c
@@ -134,7 +134,7 @@ ostree_builtin_find_remotes (int argc,
g_auto(GLnxConsoleRef) console = { 0, };
g_autoptr(GHashTable) refs_found = NULL; /* set (element-type OstreeCollectionRef) */
- context = g_option_context_new ("COLLECTION-ID REF [COLLECTION-ID REF...] - Find remotes to serve the given refs");
+ context = g_option_context_new ("COLLECTION-ID REF [COLLECTION-ID REF...]");
/* Parse options. */
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c
index 81ac3218..116fdc6b 100644
--- a/src/ostree/ot-builtin-fsck.c
+++ b/src/ostree/ot-builtin-fsck.c
@@ -219,7 +219,7 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
g_autoptr(OstreeRepo) repo = NULL;
gboolean found_corruption = FALSE;
- g_autoptr(GOptionContext) context = g_option_context_new ("- Check the repository for consistency");
+ g_autoptr(GOptionContext) context = g_option_context_new ("");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
return FALSE;
diff --git a/src/ostree/ot-builtin-gpg-sign.c b/src/ostree/ot-builtin-gpg-sign.c
index 3eeeeb01..14a46f89 100644
--- a/src/ostree/ot-builtin-gpg-sign.c
+++ b/src/ostree/ot-builtin-gpg-sign.c
@@ -210,7 +210,7 @@ ostree_builtin_gpg_sign (int argc, char **argv,OstreeCommandInvocation *invocati
int n_key_ids, ii;
gboolean ret = FALSE;
- context = g_option_context_new ("COMMIT KEY-ID... - Sign a commit");
+ context = g_option_context_new ("COMMIT KEY-ID...");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-init.c b/src/ostree/ot-builtin-init.c
index c7729e47..b6b7aed0 100644
--- a/src/ostree/ot-builtin-init.c
+++ b/src/ostree/ot-builtin-init.c
@@ -52,7 +52,7 @@ ostree_builtin_init (int argc, char **argv,OstreeCommandInvocation *invocation,
gboolean ret = FALSE;
OstreeRepoMode mode;
- context = g_option_context_new ("- Initialize a new empty repository");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-log.c b/src/ostree/ot-builtin-log.c
index ee4b37d0..a8644ec6 100644
--- a/src/ostree/ot-builtin-log.c
+++ b/src/ostree/ot-builtin-log.c
@@ -93,7 +93,7 @@ ostree_builtin_log (int argc,
g_autofree char *checksum = NULL;
OstreeDumpFlags flags = OSTREE_DUMP_NONE;
- context = g_option_context_new ("REF - Show log starting at commit or ref");
+ context = g_option_context_new ("REF");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-ls.c b/src/ostree/ot-builtin-ls.c
index bababaad..150dbc89 100644
--- a/src/ostree/ot-builtin-ls.c
+++ b/src/ostree/ot-builtin-ls.c
@@ -249,7 +249,7 @@ ostree_builtin_ls (int argc, char **argv, OstreeCommandInvocation *invocation, G
int i;
g_autoptr(GFile) root = NULL;
- context = g_option_context_new ("COMMIT [PATH...] - List file paths");
+ context = g_option_context_new ("COMMIT [PATH...]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-prune.c b/src/ostree/ot-builtin-prune.c
index ab3816bc..54b18fcc 100644
--- a/src/ostree/ot-builtin-prune.c
+++ b/src/ostree/ot-builtin-prune.c
@@ -146,7 +146,7 @@ traverse_keep_younger_than (OstreeRepo *repo, const char *checksum,
gboolean
ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("- Search for unreachable objects");
+ g_autoptr(GOptionContext) context = g_option_context_new ("");
g_autoptr(OstreeRepo) repo = NULL;
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
return FALSE;
diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c
index b907b5aa..b4a68fb3 100644
--- a/src/ostree/ot-builtin-pull-local.c
+++ b/src/ostree/ot-builtin-pull-local.c
@@ -76,7 +76,7 @@ ostree_builtin_pull_local (int argc, char **argv, OstreeCommandInvocation *invoc
g_autoptr(GPtrArray) refs_to_fetch = NULL;
OstreeRepoPullFlags pullflags = 0;
- context = g_option_context_new ("SRC_REPO [REFS...] - Copy data from SRC_REPO");
+ context = g_option_context_new ("SRC_REPO [REFS...]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c
index 719c4d5b..827468ff 100644
--- a/src/ostree/ot-builtin-pull.c
+++ b/src/ostree/ot-builtin-pull.c
@@ -155,7 +155,7 @@ ostree_builtin_pull (int argc, char **argv, OstreeCommandInvocation *invocation,
g_autoptr(OstreeAsyncProgress) progress = NULL;
gulong signal_handler_id = 0;
- context = g_option_context_new ("REMOTE [BRANCH...] - Download data from remote repository");
+ context = g_option_context_new ("REMOTE [BRANCH...]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-refs.c b/src/ostree/ot-builtin-refs.c
index 68befc74..3508a529 100644
--- a/src/ostree/ot-builtin-refs.c
+++ b/src/ostree/ot-builtin-refs.c
@@ -268,7 +268,7 @@ ostree_builtin_refs (int argc, char **argv, OstreeCommandInvocation *invocation,
g_autoptr(OstreeRepo) repo = NULL;
int i;
- context = g_option_context_new ("[PREFIX] - List refs");
+ context = g_option_context_new ("[PREFIX]");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-reset.c b/src/ostree/ot-builtin-reset.c
index f465e0cf..e9dcf230 100644
--- a/src/ostree/ot-builtin-reset.c
+++ b/src/ostree/ot-builtin-reset.c
@@ -51,7 +51,7 @@ ostree_builtin_reset (int argc,
g_autofree char *checksum = NULL;
/* FIXME: Add support for collection–refs. */
- context = g_option_context_new ("REF COMMIT - Reset a REF to a previous COMMIT");
+ context = g_option_context_new ("REF COMMIT");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-rev-parse.c b/src/ostree/ot-builtin-rev-parse.c
index cf1da5a6..8a4ee372 100644
--- a/src/ostree/ot-builtin-rev-parse.c
+++ b/src/ostree/ot-builtin-rev-parse.c
@@ -45,7 +45,7 @@ ostree_builtin_rev_parse (int argc, char **argv, OstreeCommandInvocation *invoca
int i;
g_autofree char *resolved_rev = NULL;
- context = g_option_context_new ("REV - Output the target of a rev");
+ context = g_option_context_new ("REV");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c
index 79dfd29e..2eec7f35 100644
--- a/src/ostree/ot-builtin-show.c
+++ b/src/ostree/ot-builtin-show.c
@@ -228,7 +228,7 @@ print_if_found (OstreeRepo *repo,
gboolean
ostree_builtin_show (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("OBJECT - Output a metadata object");
+ g_autoptr(GOptionContext) context = g_option_context_new ("OBJECT");
g_autoptr(OstreeRepo) repo = NULL;
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c
index c9b6b456..d053500a 100644
--- a/src/ostree/ot-builtin-static-delta.c
+++ b/src/ostree/ot-builtin-static-delta.c
@@ -126,7 +126,7 @@ static gboolean
ot_static_delta_builtin_list (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
g_autoptr(OstreeRepo) repo = NULL;
- g_autoptr(GOptionContext) context = g_option_context_new ("- list static delta files");
+ g_autoptr(GOptionContext) context = g_option_context_new ("");
if (!ostree_option_context_parse (context, list_options, &argc, &argv,
invocation, &repo, cancellable, error))
return FALSE;
@@ -154,7 +154,7 @@ ot_static_delta_builtin_show (int argc, char **argv, OstreeCommandInvocation *in
g_autoptr(OstreeRepo) repo = NULL;
const char *delta_id = NULL;
- context = g_option_context_new ("- Dump information on a delta");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, list_options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
@@ -184,7 +184,7 @@ ot_static_delta_builtin_delete (int argc, char **argv, OstreeCommandInvocation *
g_autoptr(OstreeRepo) repo = NULL;
const char *delta_id = NULL;
- context = g_option_context_new ("- Remove a delta");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, list_options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
@@ -214,7 +214,7 @@ ot_static_delta_builtin_generate (int argc, char **argv, OstreeCommandInvocation
g_autoptr(GOptionContext) context = NULL;
g_autoptr(OstreeRepo) repo = NULL;
- context = g_option_context_new ("[TO] - Generate static delta files");
+ context = g_option_context_new ("[TO]");
if (!ostree_option_context_parse (context, generate_options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
@@ -365,7 +365,7 @@ ot_static_delta_builtin_apply_offline (int argc, char **argv, OstreeCommandInvoc
g_autoptr(GOptionContext) context = NULL;
g_autoptr(OstreeRepo) repo = NULL;
- context = g_option_context_new ("- Apply static delta file");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, apply_offline_options, &argc, &argv, invocation, &repo, cancellable, error))
goto out;
diff --git a/src/ostree/ot-builtin-summary.c b/src/ostree/ot-builtin-summary.c
index a1d0fe56..c6319f15 100644
--- a/src/ostree/ot-builtin-summary.c
+++ b/src/ostree/ot-builtin-summary.c
@@ -87,7 +87,7 @@ ostree_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invocati
g_autoptr(OstreeRepo) repo = NULL;
OstreeDumpFlags flags = OSTREE_DUMP_NONE;
- context = g_option_context_new ("Manage summary metadata");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
return FALSE;
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
index c63cff7e..22166c54 100644
--- a/src/ostree/ot-main.c
+++ b/src/ostree/ot-main.c
@@ -302,8 +302,33 @@ ostree_option_context_parse (GOptionContext *context,
GError **error)
{
g_autoptr(OstreeRepo) repo = NULL;
- /* When invocation is NULL, it usually means an error occurs, do not fetch repo this case */
+ /* When invocation is NULL, do not fetch repo */
const OstreeBuiltinFlags flags = invocation ? invocation->command->flags : OSTREE_BUILTIN_FLAG_NO_REPO;
+
+ if (invocation && invocation->command->description != NULL)
+ {
+ const char *context_summary = g_option_context_get_summary (context);
+
+ /* If the summary is originally empty, we set the description, but
+ * for root commands(command with subcommands), we want to prepend
+ * the description to the existing summary string
+ */
+ if (context_summary == NULL)
+ g_option_context_set_summary (context, invocation->command->description);
+ else
+ {
+ /* TODO: remove this part once we deduplicate the ostree_option_context_new_with_commands
+ * function from other root commands( command with subcommands). Because
+ * we can directly add the summary inside the ostree_option_context_new_with_commands function.
+ */
+ g_autoptr(GString) new_summary_string = g_string_new (context_summary);
+
+ g_string_prepend (new_summary_string, "\n\n");
+ g_string_prepend (new_summary_string, invocation->command->description);
+
+ g_option_context_set_summary (context, new_summary_string->str);
+ }
+ }
/* Entries are listed in --help output in the order added. We add the
* main entries ourselves so that we can add the --repo entry first. */
diff --git a/src/ostree/ot-remote-builtin-add-cookie.c b/src/ostree/ot-remote-builtin-add-cookie.c
index 051d0389..f462d887 100644
--- a/src/ostree/ot-remote-builtin-add-cookie.c
+++ b/src/ostree/ot-remote-builtin-add-cookie.c
@@ -39,7 +39,7 @@ static GOptionEntry option_entries[] = {
gboolean
ot_remote_builtin_add_cookie (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME VALUE - Add a cookie to remote");
+ g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME VALUE");
g_autoptr(OstreeRepo) repo = NULL;
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-add.c b/src/ostree/ot-remote-builtin-add.c
index 080fd501..98fa5b90 100644
--- a/src/ostree/ot-remote-builtin-add.c
+++ b/src/ostree/ot-remote-builtin-add.c
@@ -69,7 +69,7 @@ ot_remote_builtin_add (int argc, char **argv, OstreeCommandInvocation *invocatio
g_autoptr(GVariant) options = NULL;
gboolean ret = FALSE;
- context = g_option_context_new ("NAME [metalink=|mirrorlist=]URL [BRANCH...] - Add a remote repository");
+ context = g_option_context_new ("NAME [metalink=|mirrorlist=]URL [BRANCH...]");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, NULL, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-delete-cookie.c b/src/ostree/ot-remote-builtin-delete-cookie.c
index 726f3ab6..239c12c0 100644
--- a/src/ostree/ot-remote-builtin-delete-cookie.c
+++ b/src/ostree/ot-remote-builtin-delete-cookie.c
@@ -41,7 +41,7 @@ gboolean
ot_remote_builtin_delete_cookie (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
g_autoptr(OstreeRepo) repo = NULL;
- g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME- Remove one cookie from remote");
+ g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-delete.c b/src/ostree/ot-remote-builtin-delete.c
index 54cba2bf..f2f8a567 100644
--- a/src/ostree/ot-remote-builtin-delete.c
+++ b/src/ostree/ot-remote-builtin-delete.c
@@ -44,7 +44,7 @@ gboolean
ot_remote_builtin_delete (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
- g_autoptr(GOptionContext) context = g_option_context_new ("NAME - Delete a remote repository");
+ g_autoptr(GOptionContext) context = g_option_context_new ("NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, NULL, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-gpg-import.c b/src/ostree/ot-remote-builtin-gpg-import.c
index eca2fee6..a5e106dc 100644
--- a/src/ostree/ot-remote-builtin-gpg-import.c
+++ b/src/ostree/ot-remote-builtin-gpg-import.c
@@ -105,7 +105,7 @@ ot_remote_builtin_gpg_import (int argc, char **argv, OstreeCommandInvocation *in
guint imported = 0;
gboolean ret = FALSE;
- context = g_option_context_new ("NAME [KEY-ID...] - Import GPG keys");
+ context = g_option_context_new ("NAME [KEY-ID...]");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-list-cookies.c b/src/ostree/ot-remote-builtin-list-cookies.c
index 7b7ba5d4..9ea3880a 100644
--- a/src/ostree/ot-remote-builtin-list-cookies.c
+++ b/src/ostree/ot-remote-builtin-list-cookies.c
@@ -40,7 +40,7 @@ gboolean
ot_remote_builtin_list_cookies (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
{
g_autoptr(OstreeRepo) repo = NULL;
- g_autoptr(GOptionContext) context = g_option_context_new ("NAME - Show remote repository cookies");
+ g_autoptr(GOptionContext) context = g_option_context_new ("NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-list.c b/src/ostree/ot-remote-builtin-list.c
index 589b97bb..eb5a1baa 100644
--- a/src/ostree/ot-remote-builtin-list.c
+++ b/src/ostree/ot-remote-builtin-list.c
@@ -43,7 +43,7 @@ ot_remote_builtin_list (int argc, char **argv, OstreeCommandInvocation *invocati
guint ii, n_remotes = 0;
gboolean ret = FALSE;
- context = g_option_context_new ("- List remote repository names");
+ context = g_option_context_new ("");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-refs.c b/src/ostree/ot-remote-builtin-refs.c
index 71d5b5d6..ccf89560 100644
--- a/src/ostree/ot-remote-builtin-refs.c
+++ b/src/ostree/ot-remote-builtin-refs.c
@@ -45,7 +45,7 @@ ot_remote_builtin_refs (int argc, char **argv, OstreeCommandInvocation *invocati
gboolean ret = FALSE;
g_autoptr(GHashTable) refs = NULL;
- context = g_option_context_new ("NAME - List remote refs");
+ context = g_option_context_new ("NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-show-url.c b/src/ostree/ot-remote-builtin-show-url.c
index 0f3e56f9..08274c15 100644
--- a/src/ostree/ot-remote-builtin-show-url.c
+++ b/src/ostree/ot-remote-builtin-show-url.c
@@ -42,7 +42,7 @@ ot_remote_builtin_show_url (int argc, char **argv, OstreeCommandInvocation *invo
g_autofree char *remote_url = NULL;
gboolean ret = FALSE;
- context = g_option_context_new ("NAME - Show remote repository URL");
+ context = g_option_context_new ("NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))
diff --git a/src/ostree/ot-remote-builtin-summary.c b/src/ostree/ot-remote-builtin-summary.c
index 8d501589..0c9f7724 100644
--- a/src/ostree/ot-remote-builtin-summary.c
+++ b/src/ostree/ot-remote-builtin-summary.c
@@ -52,7 +52,7 @@ ot_remote_builtin_summary (int argc, char **argv, OstreeCommandInvocation *invoc
gboolean gpg_verify_summary;
gboolean ret = FALSE;
- context = g_option_context_new ("NAME - Show remote summary");
+ context = g_option_context_new ("NAME");
if (!ostree_option_context_parse (context, option_entries, &argc, &argv,
invocation, &repo, cancellable, error))