summaryrefslogtreecommitdiff
path: root/src/patch_generate.c
Commit message (Collapse)AuthorAgeFilesLines
* diff: treat binary patches with no data specialethomson/diff-read-empty-binaryEdward Thomson2016-09-051-2/+13
| | | | | | When creating and printing diffs, deal with binary deltas that have binary data specially, versus diffs that have a binary file but lack the actual binary data.
* patch_generate: only calculate binary diffs if requestedPatrick Steinhardt2016-09-011-14/+18
| | | | | | | | | | | | | | | | When generating diffs for binary files, we load and decompress the blobs in order to generate the actual diff, which can be very costly. While we cannot avoid this for the case when we are called with the `GIT_DIFF_SHOW_BINARY` flag, we do not have to load the blobs in the case where this flag is not set, as the caller is expected to have no interest in the actual content of binary files. Fix the issue by only generating a binary diff when the caller is actually interested in the diff. As libgit2 uses heuristics to determine that a blob contains binary data by inspecting its size without loading from the ODB, this saves us quite some time when diffing in a repository with binary files.
* Teach `git_patch_from_diff` about parsed diffsethomson/patch_from_diffEdward Thomson2016-08-241-1/+1
| | | | | Ensure that `git_patch_from_diff` can return the patch for parsed diffs, not just generate a patch for a generated diff.
* packbuilder: `size_t` all the thingsEdward Thomson2016-07-241-2/+2
| | | | | | | | After 1cd65991, we were passing a pointer to an `unsigned long` to a function that now expected a pointer to a `size_t`. These types differ on 64-bit Windows, which means that we trash the stack. Use `size_t`s in the packbuilder to avoid this.
* git_diff_generated: abstract generated diffsEdward Thomson2016-05-261-0/+1
|
* patch: `patch_diff` -> `patch_generated`Edward Thomson2016-05-261-0/+953