RFR: Coalesce hunks that have overlapping context

Erik Duveblad via github.com duke at openjdk.java.net
Mon Sep 2 12:59:42 UTC 2019

On Fri, 30 Aug 2019 13:56:52 GMT, Jorn Vernee via github.com <duke at openjdk.java.net> wrote:

> The `webrev` command can generate patch files with adjacent hunks that have overlapping context. `git apply` rejects these patches.
> This PR coalesces adjacent hunks with overlapping context, which is also what's done by `git diff`.
> Also added a test for `HunkCoalescer` (since it's a pretty complex class I think it deserved it's own tests).
> Resulting webrev applies with both git and hg.
> ----------------
> Commits:
>  - 6f5f1071:	Coalesce hunks that have overlapping context, since git rejects these otherwise
> Pull request:
> https://git.openjdk.java.net/skara/pull/113
> Webrev:
> https://webrevs.openjdk.java.net/skara/113/webrev.00
> Patch:
> https://git.openjdk.java.net/skara/pull/113.diff
> Fetch command:
> git fetch https://git.openjdk.java.net/skara pull/113/head:pull/113

This PR has been reviewed by Erik Duveblad via github.com - changes are approved. Review comment:

This looks fine, but please run some additional manual testing to check that it works. Sorry for the lack of unit tests for this code :(

PR: https://git.openjdk.java.net/skara/pull/113

More information about the skara-dev mailing list