Commit Graph

13 Commits

Author SHA1 Message Date
Edward Thomson
909d549436 giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore:

1. Should not begin with a capital letter,
2. Should not conclude with punctuation, and
3. Should not end a sentence and begin a new one
2016-12-29 12:26:03 +00:00
Patrick Steinhardt
c77a55a917 common: use PRIuZ for size_t in giterr_set calls 2016-11-14 10:05:59 +01:00
Edward Thomson
adedac5aba diff: treat binary patches with no data special
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.
2016-09-05 12:26:47 -05:00
Patrick Steinhardt
274a727e0b apply: fix warning when initializing patch images 2016-08-05 10:57:42 +02:00
Edward Thomson
581a4d3942 apply: safety check files that dont end with eol 2016-07-24 15:49:19 -04:00
Edward Thomson
531be3e8c6 apply: compare preimage to image
Compare the preimage to the image; don't compare the preimage to itself.
2016-07-24 15:49:19 -04:00
Edward Thomson
53571f2f0c vector: more sensible names for grow_at/shrink_at 2016-05-26 13:01:08 -05:00
Edward Thomson
0267c34c0c patch application: drop unnecessary patch_image_init 2016-05-26 13:01:07 -05:00
Edward Thomson
b85bd8ce66 patch: use delta's old_file/new_file members
No need to replicate the old_file/new_file members, or plumb them
strangely up.
2016-05-26 13:01:04 -05:00
Edward Thomson
804d5fe9f5 patch: abstract patches into diff'ed and parsed
Patches can now come from a variety of sources - either internally
generated (from diffing two commits) or as the results of parsing
some external data.
2016-05-26 13:01:04 -05:00
Edward Thomson
3149ff6f66 patch application: apply binary patches
Handle the application of binary patches.  Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.
2016-05-26 13:01:03 -05:00
Edward Thomson
0004386f29 apply: handle empty patches
When a patch is empty, simply copy the source into the destination.
2016-05-26 11:36:11 -05:00
Edward Thomson
7cb904ba44 Introduce git_apply_patch
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
2016-05-26 11:36:11 -05:00