Basically, when rendering diffs, we split them by file so we can render
the changes made to each file separately.
However, if one of the file happens to contain a diff itself (for example
if that file is a patch), then we don't want to split that, it'll make a
mess.
So rather than splitting on "diff --git a/" we ensure we're spliting on new
lines starting with this by splitting on "\ndiff --git a/".
Basically, when rendering diffs, we split them by file so we can render
the changes made to each file separately.
However, if one of the file happens to contain a diff itself (for example
if that file is a patch), then we don't want to split that, it'll make a
mess.
So rather than splitting on "diff --git a/" we ensure we're spliting on new
lines starting with this by splitting on "\ndiff --git a/".
Fixes https://pagure.io/pagure/issue/3426
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr