Version 0.1.1 behavior is documented here. Thesupport record separates local verification frompublished MoonX behavior; moonx examples use registry releases.
Unified (---/+++/@@) and traditional context (***/---/********)patches are parsed into exact hunks. Context lines must match at the declaredposition. File headers are parsed before writes, and each file's hunks arechecked before producing its output. -Rreverses additions and removals. -pN strips leading path components, -dchanges the base directory, -i selects the patch input, and -o - emits theresult to stdout. --dry-run performs the same checks without changing files.-s suppresses routine progress; use it with -o - for clean content output.-u/-c require unified/context input and -t accepts the noninteractiveprofile. -F0 is the only accepted fuzz setting. Without -p, only thebasename is retained; unsafe traversal paths after stripping are rejected.
Creating a file from /dev/null and deleting a file to /dev/null aresupported when the result is unambiguous. Updating an existing pathname isdeliberately rejected before reading the target: an in-place write couldmodify hard-link aliases, while replacing the inode requires the originalfile mode, which released MoonBit APIs do not expose. Named -o output isalso rejected because upstream copies source permissions to the output.Use --dry-run or -o - for existing files. This is an exact-hunk subset:on a mismatch the current file produces no output, no .rej file is created,and later file patches continue. Binary, mode, rename, fuzz, offset, andinteractive patches are not implemented. Errors return 2 for a malformed orunsupported request and 1 for a hunk mismatch.--help prints usage and --version prints the command and package version.
Standalone --version prints exactly patch 0.1.1 followed by onenewline. Standalone --help starts with Usage: patch, lists bothmetadata options, and ends with a newline. Both write to stdout, leave stdinunread, and exit with status 0. Exact-version publication and verificationremain recorded separately in the support record.