Skip to content

Commit 660f162

Browse files
committed
doc: adjust indentation and add TOC in git-node.md
1 parent 60018cc commit 660f162

1 file changed

Lines changed: 79 additions & 81 deletions

File tree

docs/git-node.md

Lines changed: 79 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,23 @@
33
A custom Git command for managing pull requests. You can run it as
44
`git-node` or `git node`. To see the help text, run `git node`.
55

6+
- [Prerequistes](#prerequistes)
7+
- [`git node land`](#git-node-land)
8+
- [Git bash for Windows](#git-bash-for-windows)
9+
- [Demo & Usage](#demo--usage)
10+
- [`git node metadata`](#git-node-metadata)
11+
- [`git node v8`](#git-node-v8)
12+
- [`git node v8 major`](#git-node-v8-major)
13+
- [`git node v8 minor`](#git-node-v8-minor)
14+
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
15+
- [General options](#general-options)
16+
- [`git node wpt`](#git-node-wpt)
17+
- [Example](#example)
18+
619
## Prerequistes
720

21+
Note: the prerequistes are not required for `git node v8`.
22+
823
1. See the readme on how to
924
[set up credentials](../README.md#setting-up-credentials).
1025
1. It's a Git command, so make sure you have Git installed, of course.
@@ -34,7 +49,44 @@ A custom Git command for managing pull requests. You can run it as
3449
$ ncu-config set branch master
3550
```
3651

37-
## Demo & Usage
52+
## `git node land`
53+
54+
```
55+
git-node land [prid|options]
56+
57+
Manage the current landing session or start a new one for a pull request
58+
59+
Positionals:
60+
prid, options ID of the Pull Request [number]
61+
62+
Options:
63+
--version Show version number [boolean]
64+
--help Show help [boolean]
65+
--apply Apply a patch with the given PR id [number]
66+
--amend Amend the current commit [boolean]
67+
--continue, -c Continue the landing session [boolean]
68+
--final Verify the landed PR and clean up [boolean]
69+
--abort Abort the current landing session [boolean]
70+
71+
Examples:
72+
git node land 12344 Land https://github.com/nodejs/node/pull/12344 in
73+
the current directory
74+
git node land --abort Abort the current session
75+
git node land --amend Append metadata to the current commit message
76+
git node land --final Verify the landed PR and clean up
77+
git node land --continue Continue the current landing session
78+
```
79+
80+
### Git bash for Windows
81+
82+
If you are using `git bash` and having trouble with output use
83+
`winpty git-node.cmd metadata $PRID`.
84+
85+
current known issues with git bash:
86+
- git bash Lacks colors.
87+
- git bash output duplicates metadata.
88+
89+
### Demo & Usage
3890

3991
1. Landing multiple commits: https://asciinema.org/a/148627
4092
2. Landing one commit: https://asciinema.org/a/157445
@@ -77,35 +129,7 @@ Options:
77129
--help Show help [boolean]
78130
```
79131

80-
### `git node land`
81-
82-
```
83-
git-node land [prid|options]
84-
85-
Manage the current landing session or start a new one for a pull request
86-
87-
Positionals:
88-
prid, options ID of the Pull Request [number]
89-
90-
Options:
91-
--version Show version number [boolean]
92-
--help Show help [boolean]
93-
--apply Apply a patch with the given PR id [number]
94-
--amend Amend the current commit [boolean]
95-
--continue, -c Continue the landing session [boolean]
96-
--final Verify the landed PR and clean up [boolean]
97-
--abort Abort the current landing session [boolean]
98-
99-
Examples:
100-
git node land 12344 Land https://github.com/nodejs/node/pull/12344 in
101-
the current directory
102-
git node land --abort Abort the current session
103-
git node land --amend Append metadata to the current commit message
104-
git node land --final Verify the landed PR and clean up
105-
git node land --continue Continue the current landing session
106-
```
107-
108-
### `git node metadata`
132+
## `git node metadata`
109133

110134
This tool is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),
111135
although it is a CLI implemented with the GitHub GraphQL API.
@@ -154,81 +178,55 @@ $ git commit --amend -F msg.txt
154178
git node metadata 167 --repo llnode --readme ../node/README.md
155179
```
156180

157-
#### Git bash for Windows
158-
159-
If you are using `git bash` and having trouble with output use
160-
`winpty git-node.cmd metadata $PRID`.
161-
162-
current known issues with git bash:
163-
- git bash Lacks colors.
164-
- git bash output duplicates metadata.
165-
166-
### `git node v8`
181+
## `git node v8`
167182

168183
Update or patch the V8 engine.
169184
This tool will maintain a clone of the V8 repository in `~/.update-v8/v8`.
170185

171-
#### `git node v8 major`
172-
173-
* Replaces `deps/v8` with a newer major version.
174-
* Resets the embedder version number to `-node.0`.
175-
* Updates `NODE_MODULE_VERSION` according to the V8 version.
186+
### `git node v8 major`
176187

177-
##### Options
188+
- Replaces `deps/v8` with a newer major version.
189+
- Resets the embedder version number to `-node.0`.
190+
- Updates `NODE_MODULE_VERSION` according to the V8 version.
178191

179-
###### `--branch=branchName`
192+
Options:
180193

181-
Branch of the V8 repository to use for the upgrade.
182-
Defaults to `lkgr`.
194+
- `--branch=branchName`: Branch of the V8 repository to use for the upgrade.
195+
Defaults to `lkgr`.
183196

184-
#### `git node v8 minor`
197+
### `git node v8 minor`
185198

186199
Compare current V8 version with latest upstream of the same major. Applies a
187200
patch if necessary.
188201
If the `git apply` command fails, a patch file will be written in the Node.js
189202
clone directory.
190203

191-
#### `git node v8 backport <sha..>`
204+
### `git node v8 backport <sha..>`
192205

193206
Fetches and applies the patch corresponding to `sha`. Multiple commit SHAs can
194207
be provided to this command. Increments the V8 embedder version number or patch
195208
version and commits the changes for each commit (unless the command is
196209
called with `--squash`). If a patch fails to be applied, the command will pause
197210
and let you fix the conflicts in another terminal.
198211

199-
##### Options
200-
201-
###### `--no-bump`
202-
203-
Set this flag to skip bumping the V8 embedder version number or patch version.
204-
205-
###### `--squash`
206-
207-
Set this flag to squash multiple commits into one. This should only be done if
208-
individual commits would break the build.
209-
210-
#### General options
211-
212-
##### `--node-dir=/path/to/node`
213-
214-
Specify the path to the Node.js git repository.
215-
Defaults to current working directory.
216-
217-
##### `--base-dir=/path/to/base/dir`
218-
219-
Specify the path where V8 the clone will be maintained.
220-
Defaults to `~/.update-v8`.
221-
222-
##### `--v8-dir=/path/to/v8/`
212+
Options:
223213

224-
Specify the path of an existing V8 clone. This will be used instead of cloning
225-
V8 to `baseDir`.
214+
- `--no-bump`: Set this flag to skip bumping the V8 embedder version number or
215+
patch version.
216+
- `--squash`: Set this flag to squash multiple commits into one. This should
217+
only be done if individual commits would break the build.
226218

227-
##### `--verbose`
219+
### General options
228220

229-
Enable verbose output.
221+
- `--node-dir=/path/to/node`: Specify the path to the Node.js git repository.
222+
Defaults to current working directory.
223+
- `--base-dir=/path/to/base/dir`: Specify the path where V8 the clone will
224+
be maintained. Defaults to `~/.update-v8`.
225+
- `--v8-dir=/path/to/v8/`: Specify the path of an existing V8 clone. This
226+
will be used instead of cloning V8 to `baseDir`.
227+
- `--verbose`: Enable verbose output.
230228

231-
### `git node wpt`
229+
## `git node wpt`
232230

233231
Update or patch the Web Platform Tests in core.
234232
The updated files are placed under `./test/fixtures/wpt` by default. In addition
@@ -238,7 +236,7 @@ to the assets, this also updates:
238236
- `./test/fixtures/wpt/README.md`
239237
- `./test/fixtures/wpt/LICENSE.md`
240238

241-
#### Example
239+
### Example
242240

243241
```
244242
$ cd /path/to/node/project

0 commit comments

Comments
 (0)