summaryrefslogtreecommitdiff
path: root/src/ostree/main.c
diff options
context:
space:
mode:
authorRuixin Bao <peter.bao@mail.utoronto.ca>2017-10-13 16:15:13 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2017-10-20 12:59:32 +0000
commit3c360a720ff1a8bf695365a79b3ac7975ffd25e8 (patch)
treef62cf412aebb3719e0760ba696e8a224e4bfe986 /src/ostree/main.c
parent2531d8fe631b8484b5731f3635314ac3eb82eed5 (diff)
downloadostree-3c360a720ff1a8bf695365a79b3ac7975ffd25e8.tar.gz
ostree: Describe subcommands in help output
Added a description argument to all type of commands. Now when we include -h or --help for commands that contain subcommands, the description for those subcommands are shown. The added subcommands help will be provided to the following commands: - ostree -h - ostree admin -h - ostree admin instutil -h - ostree remote -h - ostree static-delta -h Closes: #1267 Approved by: cgwalters
Diffstat (limited to 'src/ostree/main.c')
-rw-r--r--src/ostree/main.c78
1 files changed, 52 insertions, 26 deletions
diff --git a/src/ostree/main.c b/src/ostree/main.c
index 66cfae7f..ef8f1f8a 100644
--- a/src/ostree/main.c
+++ b/src/ostree/main.c
@@ -32,37 +32,63 @@
#include "ot-builtins.h"
static OstreeCommand commands[] = {
- { "admin", ostree_builtin_admin },
- { "cat", ostree_builtin_cat },
- { "checkout", ostree_builtin_checkout },
- { "checksum", ostree_builtin_checksum },
- { "commit", ostree_builtin_commit },
- { "config", ostree_builtin_config },
- { "diff", ostree_builtin_diff },
- { "export", ostree_builtin_export },
+ { "admin", ostree_builtin_admin ,
+ "Commands that needs admin privilege" },
+ { "cat", ostree_builtin_cat,
+ "Concatenate contents of files"},
+ { "checkout", ostree_builtin_checkout,
+ "Check out a commit into a filesystem tree" },
+ { "checksum", ostree_builtin_checksum,
+ "Checksum a file or directory" },
+ { "commit", ostree_builtin_commit,
+ "Commit a new revision" },
+ { "config", ostree_builtin_config,
+ "Change repo configuration settings" },
+ { "diff", ostree_builtin_diff,
+ "Compare directory TARGETDIR against revision REV"},
+ { "export", ostree_builtin_export,
+ "Stream COMMIT to stdout in tar format" },
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
- { "find-remotes", ostree_builtin_find_remotes },
- { "create-usb", ostree_builtin_create_usb },
+ { "find-remotes", ostree_builtin_find_remotes,
+ "Find remotes to serve the given refs" },
+ { "create-usb", ostree_builtin_create_usb,
+ "Copy the refs to a USB stick" },
#endif
- { "fsck", ostree_builtin_fsck },
- { "gpg-sign", ostree_builtin_gpg_sign },
- { "init", ostree_builtin_init },
- { "log", ostree_builtin_log },
- { "ls", ostree_builtin_ls },
- { "prune", ostree_builtin_prune },
- { "pull-local", ostree_builtin_pull_local },
+ { "fsck", ostree_builtin_fsck,
+ "Check the repository for consistency" },
+ { "gpg-sign", ostree_builtin_gpg_sign,
+ "Sign a commit" },
+ { "init", ostree_builtin_init,
+ "Initialize a new empty repository" },
+ { "log", ostree_builtin_log,
+ "Show log starting at commit or ref" },
+ { "ls", ostree_builtin_ls,
+ "List file paths" },
+ { "prune", ostree_builtin_prune,
+ "Search for unreachable objects" },
+ { "pull-local", ostree_builtin_pull_local,
+ "Copy data from SRC_REPO" },
#ifdef HAVE_LIBCURL_OR_LIBSOUP
- { "pull", ostree_builtin_pull },
+ { "pull", ostree_builtin_pull,
+ "Download data from remote repository" },
#endif
- { "refs", ostree_builtin_refs },
- { "remote", ostree_builtin_remote },
- { "reset", ostree_builtin_reset },
- { "rev-parse", ostree_builtin_rev_parse },
- { "show", ostree_builtin_show },
- { "static-delta", ostree_builtin_static_delta },
- { "summary", ostree_builtin_summary },
+ { "refs", ostree_builtin_refs,
+ "List refs" },
+ { "remote", ostree_builtin_remote,
+ "Remote commands that may involve internet access" },
+ { "reset", ostree_builtin_reset,
+ "Reset a REF to a previous COMMIT" },
+ { "rev-parse", ostree_builtin_rev_parse,
+ "Output the target of a rev" },
+ { "show", ostree_builtin_show,
+ "Output a metadata object" },
+ { "static-delta", ostree_builtin_static_delta,
+ "Static delta related commands" },
+ { "summary", ostree_builtin_summary,
+ "Manage summary metadata" },
#if defined(HAVE_LIBSOUP) && defined(BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE)
- { "trivial-httpd", ostree_builtin_trivial_httpd },
+ { "trivial-httpd", ostree_builtin_trivial_httpd,
+ NULL },
#endif
{ NULL }
};