summaryrefslogtreecommitdiff
path: root/include/git2/patch.h
Commit message (Collapse)AuthorAgeFilesLines
* diff docs: update `git_diff_delta` descriptionEdward Thomson2015-02-031-6/+3
|
* Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, ↵Jacques Germishuys2014-04-111-3/+3
| | | | git_patch_num_lines_in_hunk
* Add buffer to buffer diff and patch APIsRussell Belfer2014-02-271-0/+28
| | | | | | | | This adds `git_diff_buffers` and `git_patch_from_buffers`. This also includes a bunch of internal refactoring to increase the shared code between these functions and the blob-to-blob and blob-to-buffer APIs, as well as some higher level assert helpers in the tests to also remove redundancy.
* Drop git_patch_to_strNicolas Hake2014-01-221-11/+0
| | | | | | | It's hard or even impossible to correctly free the string buffer allocated by git_patch_to_str in some circumstances. Drop the function so people have to use git_patch_to_buf instead - git_buf has a dedicated destructor.
* Expose patch serialization to git_bufNicolas Hake2014-01-221-0/+10
| | | | | | | | | | | Returning library-allocated strings from libgit2 works fine on Linux, but may cause problems on Windows because there is no one C Runtime that everything links against. With libgit2 not exposing its own allocator, freeing the string is a gamble. git_patch_to_str already serializes to a buffer, then returns the underlying memory. Expose the functionality directly, so callers can use the git_buf_free function to free the memory later.
* Update docs for new callback return value behaviorRussell Belfer2013-12-111-2/+2
|
* Create git_diff_line and extend git_diff_hunkRussell Belfer2013-10-211-15/+2
| | | | | | | | | | | | | Instead of having functions with so very many parameters to pass hunk and line data, this takes the existing git_diff_hunk struct and extends it with more hunk data, plus adds a git_diff_line. Those structs are used to pass back hunk and line data instead of the old APIs that took tons of parameters. Some work that was previously only being done for git_diff_patch creation (scanning the diff content for exact line counts) is now done for all callbacks, but the performance difference should not be noticable.
* Diff API cleanupRussell Belfer2013-10-151-12/+5
| | | | | | | | This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
* Rename diff objects and split patch.hRussell Belfer2013-10-111-0/+270
This makes no functional change to diff but renames a couple of the objects and splits the new git_patch (formerly git_diff_patch) into a new header file.