]> git.proxmox.com Git - libgit2.git/commit - src/diff_print.c
Create git_diff_line and extend git_diff_hunk
authorRussell Belfer <rb@github.com>
Mon, 21 Oct 2013 20:42:42 +0000 (13:42 -0700)
committerRussell Belfer <rb@github.com>
Mon, 21 Oct 2013 20:42:42 +0000 (13:42 -0700)
commit3b5f795446601868d52d09ebac70ae3b7aee157a
treeba900c737284e65c172fde7284af3f309b0a0078
parent74a627f04528f7e02f69d8d7947820582ce7ca15
Create git_diff_line and extend git_diff_hunk

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.
14 files changed:
examples/diff.c
examples/log.c
include/git2/diff.h
include/git2/patch.h
src/diff_patch.c
src/diff_print.c
src/diff_xdiff.c
tests-clar/diff/blob.c
tests-clar/diff/diff_helpers.c
tests-clar/diff/diff_helpers.h
tests-clar/diff/diffiter.c
tests-clar/diff/patch.c
tests-clar/diff/tree.c
tests-clar/diff/workdir.c