patchy-cli 0.0.24 → 0.0.25

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 +34 -1
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -196,7 +196,7 @@ Note: `patchy generate` is destructive and will remove any unneeded files in the
196
196
  Apply patch files from `patches/` into `target_repo`. Patch sets are applied in alphabetical order.
197
197
 
198
198
  ```sh
199
- patchy apply [--only <patch-set>] [--until <patch-set>] [--auto-commit=<mode>] [--target-repo] [--patches-dir] [--dry-run]
199
+ patchy apply [--only <patch-set>] [--until <patch-set>] [--auto-commit=<mode>] [--on-conflict=<mode>] [--target-repo] [--patches-dir] [--dry-run]
200
200
  ```
201
201
 
202
202
  | Flag | Description |
@@ -204,6 +204,39 @@ patchy apply [--only <patch-set>] [--until <patch-set>] [--auto-commit=<mode>] [
204
204
  | `--only <name>` | Apply only the specified patch set |
205
205
  | `--until <name>` | Apply patch sets up to and including the specified one |
206
206
  | `--auto-commit=<mode>` | Control auto-commit behavior (see below) |
207
+ | `--on-conflict=<mode>` | How to handle patches that fail to apply (see below) |
208
+
209
+ #### Conflict handling
210
+
211
+ When a patch doesn't apply cleanly (e.g., the upstream file changed), patchy can insert git-style conflict markers for manual resolution.
212
+
213
+ | Mode | Behavior |
214
+ |------|----------|
215
+ | `markers` (default) | Insert conflict markers and continue |
216
+ | `error` | Fail immediately (previous behavior) |
217
+
218
+ **Resolving conflicts:**
219
+
220
+ When conflicts occur, patchy outputs instructions:
221
+ ```
222
+ ✗ Applied patches with conflicts to clones/my-repo
223
+
224
+ To resolve:
225
+ 1. Edit files in clones/my-repo to resolve conflicts (remove conflict markers)
226
+ 2. Run: patchy generate --patch-set 001-fix
227
+ 3. Commit the updated patches
228
+ ```
229
+
230
+ Conflict markers look like standard git merge conflicts:
231
+ ```
232
+ <<<<<<< current
233
+ const value = 999;
234
+ =======
235
+ const value = 42;
236
+ >>>>>>> file.ts.diff
237
+ ```
238
+
239
+ Edit the file to keep the correct code, remove the marker lines, then regenerate the patch.
207
240
 
208
241
  #### Auto-commit behavior
209
242
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchy-cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "A CLI tool for managing Git patch workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,11 +67,11 @@
67
67
  "url": "https://github.com/richardgill/patchy"
68
68
  },
69
69
  "optionalDependencies": {
70
- "patchy-cli-linux-x64": "0.0.24",
71
- "patchy-cli-linux-arm64": "0.0.24",
72
- "patchy-cli-darwin-x64": "0.0.24",
73
- "patchy-cli-darwin-arm64": "0.0.24",
74
- "patchy-cli-windows-x64": "0.0.24"
70
+ "patchy-cli-linux-x64": "0.0.25",
71
+ "patchy-cli-linux-arm64": "0.0.25",
72
+ "patchy-cli-darwin-x64": "0.0.25",
73
+ "patchy-cli-darwin-arm64": "0.0.25",
74
+ "patchy-cli-windows-x64": "0.0.25"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public"