diff --git a/apps/sparo-lib/src/cli/commands/pull.ts b/apps/sparo-lib/src/cli/commands/pull.ts index 0f1695d..a1a3f90 100644 --- a/apps/sparo-lib/src/cli/commands/pull.ts +++ b/apps/sparo-lib/src/cli/commands/pull.ts @@ -19,7 +19,7 @@ export class PullCommand implements ICommand { @inject(GitService) private _gitService!: GitService; @inject(SparoProfileService) private _sparoProfileService!: SparoProfileService; - public builder(yargs: Argv<{}>): void { + public builder = (yargs: Argv<{}>): void => { /** * sparo pull [repository] [refsepc...] [--profile | --no-profile] * @@ -32,9 +32,11 @@ export class PullCommand implements ICommand { .default('profile', []) .parserConfiguration({ 'unknown-options-as-args': true }) .usage( - 'Usage: sparo pull [options] [repository] [refsepc...] [--profile | --no-profile]' + '$0 pull [options] [repository] [refsepc...] [--profile | --no-profile]' + + '\n\n' + + this.description ); - } + }; public handler = async ( args: ArgumentsCamelCase, diff --git a/apps/website/docs/pages/commands/overview.md b/apps/website/docs/pages/commands/overview.md index 9c8dec9..166189d 100644 --- a/apps/website/docs/pages/commands/overview.md +++ b/apps/website/docs/pages/commands/overview.md @@ -12,13 +12,13 @@ Sparo has four kinds of subcommands: - `sparo checkout` - `sparo clone` - `sparo fetch` - - `sparo pull` _(not implemented yet; currently mirrors `git pull`)_ + - `sparo pull` 3. **Renamed subcommands** are the mirrored versions of the four enhanced subcommands. They are renamed to add a `git-` prefix: - `sparo git-checkout` - `sparo git-clone` - `sparo git-fetch` - - `sparo git-pull` _(not implemented yet)_ + - `sparo git-pull` 4. **Auxiliary subcommands** are new subcommands that provide Sparo-specific functionality. They are: - `sparo auto-config` diff --git a/apps/website/docs/pages/commands/sparo_git-pull.md b/apps/website/docs/pages/commands/sparo_git-pull.md new file mode 100644 index 0000000..6019057 --- /dev/null +++ b/apps/website/docs/pages/commands/sparo_git-pull.md @@ -0,0 +1,11 @@ +--- +title: sparo git-pull +--- + +This is the [mirrored subcommand](./overview.md) for `git pull`. It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection. + +``` +sparo git-pull [] [ […​]] +``` + +See [git pull](https://git-scm.com/docs/git-pull) in the Git documentation for details. diff --git a/apps/website/docs/pages/commands/sparo_pull.md b/apps/website/docs/pages/commands/sparo_pull.md new file mode 100644 index 0000000..54415ce --- /dev/null +++ b/apps/website/docs/pages/commands/sparo_pull.md @@ -0,0 +1,14 @@ +--- +title: sparo pull +--- + +``` +sparo pull [options] [repository] [refsepc...] [--profile | +--no-profile] + +Incorporates changes from a remote repository into the current branch. + +Options: + --help Show help [boolean] + --profile [array] [default: []] +``` \ No newline at end of file diff --git a/apps/website/sidebars.js b/apps/website/sidebars.js index b5fbcb9..e90ca81 100644 --- a/apps/website/sidebars.js +++ b/apps/website/sidebars.js @@ -62,9 +62,11 @@ const sidebars = { 'pages/commands/sparo_checkout', 'pages/commands/sparo_clone', 'pages/commands/sparo_fetch', + 'pages/commands/sparo_pull', 'pages/commands/sparo_git-checkout', 'pages/commands/sparo_git-clone', 'pages/commands/sparo_git-fetch', + 'pages/commands/sparo_git-pull', 'pages/commands/sparo_init-profile', 'pages/commands/sparo_list-profiles' ]