Apply a diff file to an original file.
Synopsis
patch [OPTION]... [ORIGINALFILE [PATCHFILE]]
Description
Apply changes from a patch file (unified diff format) to one or more original files. Runs in the just-bash WASM shell inside SLICC.
Options
-p NUM Strip NUM leading path components from file names.
-R, --reverse Assume patches were created with old and new files swapped.
--dry-run Print results without modifying files.
Examples
$ diff -u old.js new.js > changes.patch
$ patch -p0 < changes.patch
Create and apply a patch.
Notes
Operates on the SLICC virtual filesystem (LightningFS/IndexedDB). Supports unified diff format. Includes fuzzy matching for patch context.
See Also
diff