Skip to main content

Module patch

Module patch 

Source
Expand description

Patch application and Git utilities for automated patch deployment.

Enums§

PatchError
Errors returned by patch operations.
PatchStep
Steps reported via progress callback during apply_patch_and_push.

Functions§

apply_patch_and_push
Apply a patch file, commit, and push to origin. Returns the branch name that was pushed.
git_version_check
Check that the system git binary is >= 2.39.2 (CVE-2023-23946 patched).
parse_git_version_str
Parse a git version string like "git version 2.39.2" or "git version 2.46.2 (Apple Git-139)". Returns Err(PatchError::GitTooOld) if version < 2.39.2 or if parsing fails.
slugify_title
Slugify a PR title into a valid git branch name segment. Follows the algorithm from issue #1126.
validate_patch_paths
Validate patch file path headers for traversal and symlink attacks.