feat: update website for sparo pull and sparo git-pull

This commit is contained in:
Cheng Liu 2024-04-09 16:04:42 -07:00
parent 9aadefbcbd
commit c5900b7dad
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6
5 changed files with 34 additions and 5 deletions

View file

@ -19,7 +19,7 @@ export class PullCommand implements ICommand<IPullCommandOptions> {
@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 <profile_name> | --no-profile]
*
@ -32,9 +32,11 @@ export class PullCommand implements ICommand<IPullCommandOptions> {
.default('profile', [])
.parserConfiguration({ 'unknown-options-as-args': true })
.usage(
'Usage: sparo pull [options] [repository] [refsepc...] [--profile <profile_name> | --no-profile]'
'$0 pull [options] [repository] [refsepc...] [--profile <profile_name> | --no-profile]' +
'\n\n' +
this.description
);
}
};
public handler = async (
args: ArgumentsCamelCase<IPullCommandOptions>,

View file

@ -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`

View file

@ -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 [<options>] [<repository> [<refspec>…​]]
```
See [git pull](https://git-scm.com/docs/git-pull) in the Git documentation for details.

View file

@ -0,0 +1,14 @@
---
title: sparo pull
---
```
sparo pull [options] [repository] [refsepc...] [--profile <profile_name> |
--no-profile]
Incorporates changes from a remote repository into the current branch.
Options:
--help Show help [boolean]
--profile [array] [default: []]
```

View file

@ -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'
]