apply
Apply a Diff to the given repo, making changes directly in the working directory, the index, or both.
Signature
ts
class Repository {
apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void;
}Parameters
- diffrequired · Diff
The diff to apply
- locationrequired · ApplyLocation
The location to apply
Possible application locations for git_apply
see <https://libgit2.org/libgit2/#HEAD/type/git_apply_options> - optionsnull | ApplyOptions
The options for the apply
- checkboolean
Don't actually make changes, just test that the patch applies.
- checkboolean
