diff options
author | Russell Belfer <rb@github.com> | 2013-01-11 11:20:44 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-01-11 11:20:44 -0800 |
commit | 805c476c83d100696b9ebe578f0ee2399d55b3c8 (patch) | |
tree | 0c675452d35f476e96d0cb6426de7c68ed45f1cd /src/diff_output.h | |
parent | d0b14cea0e1ff09af83a801c1a9cf1a431d46d0c (diff) | |
download | libgit2-805c476c83d100696b9ebe578f0ee2399d55b3c8.tar.gz |
Fix diff patch line number calculation
This was just wrong. Added a test that verifying patch line
numbers even for hunks further into a file and then fixed the
algorithm. I needed to add a little extra state into the patch
so that I could track old and new file numbers independently,
but it should be okay.
Diffstat (limited to 'src/diff_output.h')
-rw-r--r-- | src/diff_output.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/diff_output.h b/src/diff_output.h index 7785bf54b..ae1a491ec 100644 --- a/src/diff_output.h +++ b/src/diff_output.h @@ -72,6 +72,7 @@ struct git_diff_patch { size_t hunks_asize, hunks_size; diff_patch_line *lines; size_t lines_asize, lines_size; + size_t oldno, newno; }; /* context for performing diff on a single delta */ |