Patch application by ethomson · Pull Request #2280 · libgit2/libgit2 · GitHub
Skip to content

Patch application#2280

Closed
ethomson wants to merge 2 commits into
libgit2:developmentfrom
ethomson:apply
Closed

Patch application#2280
ethomson wants to merge 2 commits into
libgit2:developmentfrom
ethomson:apply

Conversation

@ethomson

Copy link
Copy Markdown
Member

This PR is attempting to take an initial bite out of patch application, a la git-apply. My goal is to parse a git-style patch file created with libgit2 or git.git into a git_patch and be able to apply a git_patch to a buffer. This does not yet open up any public API for application, just internal methods; I was hoping to get some eyeballs on this and perhaps even merge it before I did something like applying patches into the working directory.

Things left todo:

  • Binary patches
  • Traditional-format patches (should just need to parse their headers)
  • Improved whitespace tolerance during application
  • Context reduction during application

@ethomson

Copy link
Copy Markdown
Member Author

@ethomson

Copy link
Copy Markdown
Member Author

And also a big thanks to @arrbee for making git_patch so sane that I could mostly plug right into it. I had this populating a different structure, first, as a proof of concept before throwing that away and moving it into the existing patch. Very glad that worked out the way it did; though I need to give this a second pass and make sure that I'm not neglecting to populate any fields. But the tests to apply from the git_patch make me pretty confident.

@arrbee

arrbee commented Apr 18, 2014

Copy link
Copy Markdown
Member

/cc @brianmario - I think we were just talking about stuff related to this

Edward Thomson added 2 commits April 21, 2014 15:28
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
@Therzok

Therzok commented Oct 24, 2014

Copy link
Copy Markdown
Member

What's the status of this?

@ethomson

Copy link
Copy Markdown
Member Author

Totally stalled and not something that I'm going to have time to attack in the near future.

@Therzok

Therzok commented Nov 11, 2014

Copy link
Copy Markdown
Member

Can I take on this PR and try and hack on it?

@ethomson ethomson force-pushed the apply branch 2 times, most recently from 9a2e14d to a3839dd Compare June 15, 2015 20:35
@ethomson

Copy link
Copy Markdown
Member Author

@ethomson ethomson closed this Jun 15, 2015
@ethomson ethomson mentioned this pull request Jun 15, 2015
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants