patch

    patch command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.5
    License
    Apache-2.0
    Last updated
    8 hours ago
    Downloads
    150

    #patch

    Apply unified or context patches through MoonX.

    #Usage

    moonx cli/patch --dry-run -p1 -i changes.patch moonx cli/patch -p1 -i changes.patch --output=- > patched.txt

    Read a patch from stdin or -i, resolve target paths and apply matching hunks. Offset matching and fuzz are supported; default fuzz is two.

    #Common options

    OptionDescription
    -p VALUE, --strip VALUEremove N leading file-name components
    -i VALUE, --input VALUEread the patch from FILE instead of stdin
    -o VALUE, --output VALUEwrite patched files to stdout
    -r VALUE, --reject-file VALUEwrite rejected hunks to a new FILE; - discards
    -R, --reverseapply additions as removals and vice versa
    --dry-runcheck without writing or deleting files
    -F VALUE, --fuzz VALUEIgnore up to this many outer context lines. Default: 2.
    --helpShow help.
    --versionShow the version.

    Use --help for the complete option list.

    #Notes

    • Rewriting existing files and named --output paths are rejected because source mode metadata is unavailable. Use --dry-run or --output=-; creating a new patch target remains supported.
    • Existing reject files cannot be replaced. Binary patches and extended rename/mode patch formats are unsupported.

    See the compatibility guide for the supported profile.

    Source Files