class Git::Commands::Apply

Implements ‘git apply` to apply a patch to files and/or to the index

Reads the supplied diff output (a patch) and applies it to files. Without options, the command applies the patch only to working tree files. With ‘index: true`, the patch is also applied to the index. With `cached: true`, the patch is only applied to the index.

@example Typical usage

apply = Git::Commands::Apply.new(execution_context)
apply.call('fix.patch')
apply.call('fix.patch', cached: true)
apply.call('fix.patch', check: true)
apply.call('fix.patch', reverse: true)

@note ‘arguments` block audited against git-scm.com/docs/git-apply/2.53.0

@see git-scm.com/docs/git-apply git-apply

@see Git::Commands

@api private