git-repo/man
Mike Frysinger 56345c345b repo: refactor help output handling
Currently we have the behavior:
* `repo`: Equivalent to `repo help` -- only shows common subcommands
  (with short description), and then exits 0.
* `repo --help`: Shows repo's core options, lists all commands (no
  specific info), and then exits 0.

The first case is not behaving well:
* If you run `repo` without a specific subcommand, that's an error,
  so we should be exiting 1 instead.
* Showing only subcommands and no actual option summary makes it seem
  like repo itself doesn't take any options.  This confuses users.

Let's rework things a bit.  Now we have the behavior:
* `repo`: Shows repo's core options, lists all commands (no specific
  info), and then exits 1.
* `repo --help`: Shows repo's core options, shows common subcommands
  (with short description), and then exits 0.
* `repo --help-all`: Shows repo's core options, shows all subcommands
  (with short description), and then exits 0.

Basically we swap the behavior of `repo` and `repo --help`, and fix
the exit status when the subcommand is missing.

The addition of --help-all is mostly for the man pages.  We were
relying on `repo help --all` to generate the repo(1) man page, but
that too omitted the core repo options.  Now the man page includes
all the core repo options and provides a summary of all commands.

Change-Id: I1f99b99d5b8af2591f96a078d0647a3d76d6b0fc
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312908
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
2021-07-28 05:38:34 +00:00
..
repo-abandon.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-branch.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-branches.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-checkout.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-cherry-pick.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-diff.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-diffmanifests.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-download.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-forall.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-gitc-delete.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-gitc-init.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-grep.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-help.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-info.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-init.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-list.1 list: add a --relative-to option 2021-07-27 06:20:52 +00:00
repo-manifest.1 repo: refactor help output handling 2021-07-28 05:38:34 +00:00
repo-overview.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-prune.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-rebase.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-selfupdate.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-smartsync.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-stage.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-start.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-status.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-sync.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-upload.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo-version.1 Add script 'release/update-manpages' to generate manpages 2021-07-16 20:11:41 +00:00
repo.1 repo: refactor help output handling 2021-07-28 05:38:34 +00:00