https://github.com/chamons/patch-iron
A little hack to patch patch files
https://github.com/chamons/patch-iron
Last synced: 12 days ago
JSON representation
A little hack to patch patch files
- Host: GitHub
- URL: https://github.com/chamons/patch-iron
- Owner: chamons
- License: mit
- Created: 2017-12-14T20:05:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T20:18:28.000Z (almost 4 years ago)
- Last Synced: 2025-01-20T14:55:23.884Z (12 months ago)
- Language: C#
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## patch-iron
A processing hack for ironing patches into shape.
It allows you to process each chunk making changes based upon it's local content.
It is useful when a task is more difficult that can be easily solved with grepdiff and a bash script.
### Usage
- Open patch-iron.sln and bend Conversion.cs ProcessChunk () to your bidding.
- Build
- Run mono patch-iron.exe foo.patch > bar.patch
### Hints
- Patches contain offset headers:
```
+++ b/src/AVFoundation/AVAssetDownloadTask.cs
@@ -9,16 +9,9 @@
```
that can be complex to replace, so in almost all cases it is better to replace one line with another, or just change a removal/add to keep by flipping the first characters.
- If you corrupt the headers, you'll get `patch: **** Only garbage was found in the patch input.` or `patch: **** malformed patch at line 14:`.
- Patch's have many PatchPart, which have many PatchChunk, each one a number of lines.
- Range from PatchChunk::CalculateDiffs will spell out the range of each diff in a chunk