There seem to be several issues when blending diffs with files or folders. This patch does the following:
- Adjust the depth in order to get the correct filename to use for blending (see method adjustDepthInPath).
- Before blending check if the hunk applies cleanly and if not raise an error.