Skip to content

Add git_apply #841

@jorgecarleitao

Description

@jorgecarleitao

apply has been merged to libgit2 in this PR.
This issue is about exposing it to pygit2.

One way is to support repository.apply(diff), e.g.

with open(path, 'r') as f:
    patch = f.read()

repo.apply(pygit2.Diff.parse_diff(patch))

I already have a patch for this (src/repository.*) and I am in the process of adding unit tests to it.

Is this something worth and that I should continue to put efford on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions