patchy-cli 0.0.9-pr.180.2f54d90 → 0.0.9-pr.182.9248853
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -14
- package/package.json +6 -6
- package/schema.json +4 -1
package/README.md
CHANGED
|
@@ -46,7 +46,8 @@ Create a folder for the fork: `mkdir spoon-knife-fork && cd spoon-knife-fork`
|
|
|
46
46
|
"patches_dir": "./patches/",
|
|
47
47
|
"clones_dir": "./clones/",
|
|
48
48
|
"target_repo": "spoon-knife",
|
|
49
|
-
"
|
|
49
|
+
"base_revision": "d0dd1f61b33d64e29d8bc1372a94ef6a2fee76a9",
|
|
50
|
+
"upstream_branch": "main"
|
|
50
51
|
}
|
|
51
52
|
```
|
|
52
53
|
|
|
@@ -94,7 +95,7 @@ Patchy will prompt you to create your first **patch set**, let's name it: 'first
|
|
|
94
95
|
|
|
95
96
|
### Reapplying patches:
|
|
96
97
|
|
|
97
|
-
Reset the current upstream repo `patchy repo reset
|
|
98
|
+
Reset the current upstream repo with `patchy repo reset`, which will reset everything to `base_revision`:
|
|
98
99
|
|
|
99
100
|
```
|
|
100
101
|
./
|
|
@@ -175,8 +176,11 @@ patchy init
|
|
|
175
176
|
// If not set, prompts interactively or errors in non-interactive mode.
|
|
176
177
|
"patch_set": "001-security-fixes", // Override: --patch-set | env: PATCHY_PATCH_SET
|
|
177
178
|
|
|
178
|
-
// Git
|
|
179
|
-
"
|
|
179
|
+
// Git SHA or tag to use as the base for patches.
|
|
180
|
+
"base_revision": "abc123def", // Override: --base-revision | env: PATCHY_BASE_REVISION
|
|
181
|
+
|
|
182
|
+
// Remote branch to track for updates (e.g., "main"). Used by `patchy base` to find new commits/tags.
|
|
183
|
+
"upstream_branch": "main" // Override: --upstream-branch | env: PATCHY_UPSTREAM_BRANCH
|
|
180
184
|
}
|
|
181
185
|
```
|
|
182
186
|
Precedence: CLI flags > Environment variables > `patchy.json`
|
|
@@ -223,39 +227,42 @@ Note: `patchy generate` is destructive and will remove any unneeded files in the
|
|
|
223
227
|
|
|
224
228
|
### `patchy apply`
|
|
225
229
|
|
|
226
|
-
Apply patch files from `patches/` into `target_repo`. Patch sets are applied in alphabetical order.
|
|
230
|
+
Apply patch files from `patches/` into `target_repo`. Patch sets are applied in alphabetical order, with each patch set committed automatically.
|
|
227
231
|
|
|
228
232
|
```sh
|
|
229
|
-
patchy apply [--only <patch-set>] [--until <patch-set>] [--target-repo] [--patches-dir] [--dry-run]
|
|
233
|
+
patchy apply [--only <patch-set>] [--until <patch-set>] [--all] [--edit] [--target-repo] [--patches-dir] [--dry-run]
|
|
230
234
|
```
|
|
231
235
|
|
|
232
236
|
| Flag | Description |
|
|
233
237
|
|------|-------------|
|
|
234
238
|
| `--only <name>` | Apply only the specified patch set |
|
|
235
239
|
| `--until <name>` | Apply patch sets up to and including the specified one |
|
|
240
|
+
| `--all` | Commit all patch sets without prompting |
|
|
241
|
+
| `--edit` | Leave the last patch set uncommitted for manual review |
|
|
236
242
|
|
|
237
243
|
### `patchy repo reset`
|
|
238
244
|
|
|
239
|
-
Hard reset the Git working tree of `target_repo`. Discards local changes.
|
|
245
|
+
Hard reset the Git working tree of `target_repo` to `base_revision`. Discards all local changes and patch commits.
|
|
240
246
|
|
|
241
247
|
```sh
|
|
242
|
-
patchy repo reset [--target-repo]
|
|
248
|
+
patchy repo reset [--base-revision] [--target-repo]
|
|
243
249
|
```
|
|
244
250
|
|
|
245
|
-
### `patchy repo
|
|
251
|
+
### `patchy repo clone`
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
Clone a repository into a subdirectory of `clones_dir` and checkout `base_revision`. The target directory is derived from the repo name.
|
|
248
254
|
|
|
249
255
|
```sh
|
|
250
|
-
patchy repo
|
|
256
|
+
patchy repo clone [--source-repo] [--clones-dir] [--base-revision]
|
|
251
257
|
```
|
|
252
258
|
|
|
253
|
-
### `patchy
|
|
259
|
+
### `patchy base [revision]`
|
|
254
260
|
|
|
255
|
-
|
|
261
|
+
View or update the `base_revision` in config.
|
|
256
262
|
|
|
257
263
|
```sh
|
|
258
|
-
patchy
|
|
264
|
+
patchy base # Interactive
|
|
265
|
+
patchy base abc123def # Set base_revision to the specified SHA or tag
|
|
259
266
|
```
|
|
260
267
|
|
|
261
268
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchy-cli",
|
|
3
|
-
"version": "0.0.9-pr.
|
|
3
|
+
"version": "0.0.9-pr.182.9248853",
|
|
4
4
|
"description": "A CLI tool for managing Git patch workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"url": "https://github.com/richardgill/patchy"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"patchy-cli-linux-x64": "0.0.9-pr.
|
|
69
|
-
"patchy-cli-linux-arm64": "0.0.9-pr.
|
|
70
|
-
"patchy-cli-darwin-x64": "0.0.9-pr.
|
|
71
|
-
"patchy-cli-darwin-arm64": "0.0.9-pr.
|
|
72
|
-
"patchy-cli-windows-x64": "0.0.9-pr.
|
|
68
|
+
"patchy-cli-linux-x64": "0.0.9-pr.182.9248853",
|
|
69
|
+
"patchy-cli-linux-arm64": "0.0.9-pr.182.9248853",
|
|
70
|
+
"patchy-cli-darwin-x64": "0.0.9-pr.182.9248853",
|
|
71
|
+
"patchy-cli-darwin-arm64": "0.0.9-pr.182.9248853",
|
|
72
|
+
"patchy-cli-windows-x64": "0.0.9-pr.182.9248853"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|