summaryrefslogtreecommitdiff
path: root/tests/diff/patch.c
Commit message (Collapse)AuthorAgeFilesLines
* buf: remove internal `git_buf_text` namespaceEdward Thomson2021-05-111-1/+0
| | | | | The `git_buf_text` namespace is unnecessary and strange. Remove it, just keep the functions prefixed with `git_buf`.
* Rename opt init functions to `options_init`Edward Thomson2019-06-141-1/+1
| | | | | | | | | | | | | In libgit2 nomenclature, when we need to verb a direct object, we name a function `git_directobject_verb`. Thus, if we need to init an options structure named `git_foo_options`, then the name of the function that does that should be `git_foo_options_init`. The previous names of `git_foo_init_options` is close - it _sounds_ as if it's initializing the options of a `foo`, but in fact `git_foo_options` is its own noun that should be respected. Deprecate the old names; they'll now call directly to the new ones.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-7/+7
|
* Sanitize the hunk header to ensure it contains UTF-8 valid dataStan Hu2018-05-051-0/+92
| | | | | | | | | | The diff driver truncates the hunk header text to 80 bytes, which can truncate 4-byte Unicode characters and introduce garbage characters in the diff output. This change sanitizes the hunk header before it is displayed. This mirrors the test in git: https://github.com/git/git/blob/master/t/t4025-hunk-header.sh Closes https://github.com/libgit2/rugged/issues/716
* patch: emit binary patches (optionally)Edward Thomson2014-04-221-0/+1
|
* Drop git_patch_to_strNicolas Hake2014-01-221-21/+22
| | | | | | | 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.
* More tests of canceling from callbacksRussell Belfer2013-12-121-3/+36
| | | | | This covers diff print, push, and ref foreach. This also has a fix for a small memory leak in the push tests.
* Add content offset to git_diff_lineNick Hengeveld2013-11-181-0/+6
| | | | | | For additions and deletions, external consumers like subversion can make use of the content offset to generate diffs in their proprietary formats.
* Rename tests-clar to testsBen Straub2013-11-141-0/+571