[Approved] RFR: Fix number of context lines between coalesced hunks
rwestberg at openjdk.org
Fri Oct 18 12:02:41 UTC 2019
On Fri, 18 Oct 2019 11:36:18 GMT, Erik Helin <ehelin at openjdk.org> wrote:
> Hi all,
> this patch fixes a smal issue with the `HunkCoalescer`. If two hunks are more than 2 * number-of-context-lines apart then we correctly calculate that they should be coalesced, but we don't include the correct number of context lines. We only include number-of-context-lines (.e.g. 5), not up to the maximum which is 2 * number-of-context-lines (e.g. 10). This small patch fixes this problem.
> Thanks to @lkorinth for reporting this bug!
> - a1053732: Fix number of context lines between coalesced hunks
> Changes: https://git.openjdk.java.net/skara/pull/213/files
> Webrev: https://webrevs.openjdk.java.net/skara/213/webrev.00
> Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
> Patch: https://git.openjdk.java.net/skara/pull/213.diff
> Fetch: git fetch https://git.openjdk.java.net/skara pull/213/head:pull/213
Looks good, some sort of regression test would perhaps have been nice though..
Approved by rwestberg (Reviewer).
More information about the skara-dev