RFR: Coalesce hunks that have overlapping context

Jorn Vernee via github.com duke at openjdk.java.net
Fri Aug 30 13:56:52 UTC 2019


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


More information about the skara-dev mailing list