diff options
author | Evan Read <eread@gitlab.com> | 2023-05-30 04:52:39 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2023-05-31 00:50:37 +0300 |
commit | 09fecd1f68ee18fd9453c283bc7226ae1e5c702b (patch) | |
tree | 8df91fd64e02ff7cc0fa37840e3db0fd667ec0c6 | |
parent | 15064bc93615aaa07677a19c774c27a7775dd804 (diff) |
Edit some Gitaly CLI command text
-rw-r--r-- | cmd/gitaly/main_test.go | 4 | ||||
-rw-r--r-- | internal/cli/gitaly/app.go | 7 | ||||
-rw-r--r-- | internal/cli/gitaly/check.go | 1 | ||||
-rw-r--r-- | internal/cli/gitaly/configuration-validate.go | 10 | ||||
-rw-r--r-- | internal/cli/gitaly/hooks.go | 7 | ||||
-rw-r--r-- | internal/cli/gitaly/serve.go | 1 |
6 files changed, 18 insertions, 12 deletions
diff --git a/cmd/gitaly/main_test.go b/cmd/gitaly/main_test.go index 78f46f7d6..58113c9be 100644 --- a/cmd/gitaly/main_test.go +++ b/cmd/gitaly/main_test.go @@ -30,7 +30,7 @@ func TestGitalyCLI(t *testing.T) { { desc: "without arguments", exitCode: 2, - stdout: "NAME:\n gitaly - a git server\n\nUSAGE:\n gitaly command [command options] [arguments...]\n\nCOMMANDS:\n serve launch the server daemon\n check verify internal API is accessible\n configuration allows to run commands related to the configuration\n hooks manage hooks for a git repository\n\nOPTIONS:\n --help, -h show help\n --version, -v print the version\n", + stdout: "NAME:\n gitaly - a Git RPC service\n\nUSAGE:\n gitaly command [command options] [arguments...]\n\nDESCRIPTION:\n Gitaly is a Git RPC service for handling Git calls.\n\nCOMMANDS:\n serve launch the server daemon\n check verify internal API is accessible\n configuration run configuration-related commands\n hooks manage Git hooks\n\nOPTIONS:\n --help, -h show help\n --version, -v print the version\n", }, { desc: "with non-existent config", @@ -42,7 +42,7 @@ func TestGitalyCLI(t *testing.T) { desc: "check without config", args: []string{"check"}, exitCode: 2, - stdout: "NAME:\n gitaly check - verify internal API is accessible\n\nUSAGE:\n gitaly check command [command options] <configfile>\n\nOPTIONS:\n --help, -h show help\n", + stdout: "NAME:\n gitaly check - verify internal API is accessible\n\nUSAGE:\n gitaly check command [command options] <configfile>\n\nDESCRIPTION:\n Check that the internal Gitaly API is accessible.\n\nOPTIONS:\n --help, -h show help\n", stderr: "invalid argument(s)", }, { diff --git a/internal/cli/gitaly/app.go b/internal/cli/gitaly/app.go index 2151290c0..50bb3b7f3 100644 --- a/internal/cli/gitaly/app.go +++ b/internal/cli/gitaly/app.go @@ -18,9 +18,10 @@ func init() { // NewApp returns a new gitaly app. func NewApp() *cli.App { return &cli.App{ - Name: "gitaly", - Usage: "a git server", - Version: version.GetVersionString("Gitaly"), + Name: "gitaly", + Usage: "a Git RPC service", + Description: "Gitaly is a Git RPC service for handling Git calls.", + Version: version.GetVersionString("Gitaly"), // serveAction is also here in the root to keep the CLI backwards compatible // with the previous way to launch Gitaly with just `gitaly <configfile>`. We // may want to deprecate this eventually. diff --git a/internal/cli/gitaly/check.go b/internal/cli/gitaly/check.go index 64132c749..8e66a1f1c 100644 --- a/internal/cli/gitaly/check.go +++ b/internal/cli/gitaly/check.go @@ -17,6 +17,7 @@ func newCheckCommand() *cli.Command { return &cli.Command{ Name: "check", Usage: "verify internal API is accessible", + Description: "Check that the internal Gitaly API is accessible.", ArgsUsage: "<configfile>", Action: checkAction, HideHelpCommand: true, diff --git a/internal/cli/gitaly/configuration-validate.go b/internal/cli/gitaly/configuration-validate.go index efc965be8..64e0327e8 100644 --- a/internal/cli/gitaly/configuration-validate.go +++ b/internal/cli/gitaly/configuration-validate.go @@ -12,13 +12,15 @@ const validationErrorCode = 2 func newConfigurationCommand() *cli.Command { return &cli.Command{ Name: "configuration", - Usage: "allows to run commands related to the configuration", + Usage: "run configuration-related commands", + Description: "Run commands related to Gitaly configuration.", HideHelpCommand: true, Subcommands: []*cli.Command{ { - Name: "validate", - Usage: "checks if provided on STDIN configuration is valid", - Action: validateConfigurationAction, + Name: "validate", + Usage: "validate configuration", + Description: "check that configuration provided on stdin is valid.", + Action: validateConfigurationAction, }, }, } diff --git a/internal/cli/gitaly/hooks.go b/internal/cli/gitaly/hooks.go index d7e6b3373..d4affbb1b 100644 --- a/internal/cli/gitaly/hooks.go +++ b/internal/cli/gitaly/hooks.go @@ -28,13 +28,14 @@ const ( func newHooksCommand() *cli.Command { return &cli.Command{ Name: "hooks", - Usage: "manage hooks for a git repository", + Usage: "manage Git hooks", + Description: "Manage hooks for a Git repository.", HideHelpCommand: true, Subcommands: []*cli.Command{ { Name: "set", - Usage: "set custom hooks for a git repository", - Description: "Reads a tarball containing custom git hooks from stdin and writes the hooks to the specified repository", + Usage: "set custom hooks for a Git repository", + Description: "Reads a tarball containing custom Git hooks from stdin and writes the hooks to the specified repository.", Action: setHooksAction, Flags: []cli.Flag{ &cli.StringFlag{ diff --git a/internal/cli/gitaly/serve.go b/internal/cli/gitaly/serve.go index 4f0e7ea1f..aec987c81 100644 --- a/internal/cli/gitaly/serve.go +++ b/internal/cli/gitaly/serve.go @@ -55,6 +55,7 @@ func newServeCommand() *cli.Command { return &cli.Command{ Name: "serve", Usage: "launch the server daemon", + Description: "Launch the Gitaly server daemon.", ArgsUsage: "<configfile>", Action: serveAction, HideHelpCommand: true, |