patchy-cli 0.0.9-pr.178.ec0dbd4 → 0.0.9-pr.179.a2f2b32

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.
Files changed (2) hide show
  1. package/README.md +25 -10
  2. package/package.json +6 -6
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
- "ref": "main"
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 main`, which will reset everything to `main`:
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 ref to checkout (branch, tag, SHA).
179
- "ref": "main" // Override: --ref | env: PATCHY_REF
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,31 +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
251
  ### `patchy repo clone`
246
252
 
247
- Clone a repository into a subdirectory of `clones_dir`. The target directory is derived from the repo name.
253
+ Clone a repository into a subdirectory of `clones_dir` and checkout `base_revision`. The target directory is derived from the repo name.
254
+
255
+ ```sh
256
+ patchy repo clone [--source-repo] [--clones-dir] [--base-revision]
257
+ ```
258
+
259
+ ### `patchy base [revision]`
260
+
261
+ View or update the `base_revision` in config.
248
262
 
249
263
  ```sh
250
- patchy repo clone [--source-repo] [--clones-dir] [--ref]
264
+ patchy base # Interactive
265
+ patchy base abc123def # Set base_revision to the specified SHA or tag
251
266
  ```
252
267
 
253
268
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchy-cli",
3
- "version": "0.0.9-pr.178.ec0dbd4",
3
+ "version": "0.0.9-pr.179.a2f2b32",
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.178.ec0dbd4",
69
- "patchy-cli-linux-arm64": "0.0.9-pr.178.ec0dbd4",
70
- "patchy-cli-darwin-x64": "0.0.9-pr.178.ec0dbd4",
71
- "patchy-cli-darwin-arm64": "0.0.9-pr.178.ec0dbd4",
72
- "patchy-cli-windows-x64": "0.0.9-pr.178.ec0dbd4"
68
+ "patchy-cli-linux-x64": "0.0.9-pr.179.a2f2b32",
69
+ "patchy-cli-linux-arm64": "0.0.9-pr.179.a2f2b32",
70
+ "patchy-cli-darwin-x64": "0.0.9-pr.179.a2f2b32",
71
+ "patchy-cli-darwin-arm64": "0.0.9-pr.179.a2f2b32",
72
+ "patchy-cli-windows-x64": "0.0.9-pr.179.a2f2b32"
73
73
  },
74
74
  "publishConfig": {
75
75
  "access": "public"