Skip to content

apply

주어진 리포지토리에 Diff를 적용해서 작업 디렉터리, 인덱스 또는 둘 다에 직접 변경 사항을 반영해요.

시그니처

ts
class Repository {
  apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void;
}

파라미터

  • diff필수 · Diff

    적용할 diff

  • location필수 · ApplyLocation

    적용할 위치

    git_apply의 가능한 적용 위치
    <https://libgit2.org/libgit2/#HEAD/type/git_apply_options> 참고

  • optionsnull | ApplyOptions

    apply에 대한 옵션

    • checkboolean

      실제로 변경 사항을 만들지 않고 패치가 적용되는지만 테스트해요.

MIT 라이선스에 따라 배포됩니다.