There are three actual changes in this commit: 1. When the trailing newline of a file is removed in a diff, the change will now be reported with `GIT_DIFF_LINE_DEL_EOFNL` passed to the callback. Previously, the `ADD_EOFNL` constant was given which was just an error in my understanding of when the various circumstances arose. `GIT_DIFF_LINE_ADD_EOFNL` is deprecated and should never be generated. A new newline is simply an `ADD`. 2. Rewrote the `diff_delta__merge_like_cgit` function that contains the core logic of the `git_diff_merge` implementation. The new version doesn't actually have significantly different behavior, but the logic should be much more obvious, I think. 3. Fixed a bug in `git_diff_merge` where it freed a string pool while some of the string data was still in use. This led to `git_diff_print_patch` accessing memory that had been freed. The rest of this commit contains improved documentation in `diff.h` to make the behavior and the equivalencies with core git clearer, and a bunch of new tests to cover the various cases, oh and a minor simplification of `examples/diff.c`.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
attr.h | Loading commit data... | |
blob.h | Loading commit data... | |
branch.h | Loading commit data... | |
commit.h | Loading commit data... | |
common.h | Loading commit data... | |
config.h | Loading commit data... | |
diff.h | Loading commit data... | |
errors.h | Loading commit data... | |
index.h | Loading commit data... | |
indexer.h | Loading commit data... | |
inttypes.h | Loading commit data... | |
merge.h | Loading commit data... | |
net.h | Loading commit data... | |
notes.h | Loading commit data... | |
object.h | Loading commit data... | |
odb.h | Loading commit data... | |
odb_backend.h | Loading commit data... | |
oid.h | Loading commit data... | |
reflog.h | Loading commit data... | |
refs.h | Loading commit data... | |
refspec.h | Loading commit data... | |
remote.h | Loading commit data... | |
repository.h | Loading commit data... | |
reset.h | Loading commit data... | |
revparse.h | Loading commit data... | |
revwalk.h | Loading commit data... | |
signature.h | Loading commit data... | |
status.h | Loading commit data... | |
stdint.h | Loading commit data... | |
submodule.h | Loading commit data... | |
tag.h | Loading commit data... | |
threads.h | Loading commit data... | |
tree.h | Loading commit data... | |
types.h | Loading commit data... | |
version.h | Loading commit data... | |
windows.h | Loading commit data... |