#3434 Fix splitting the diff per file
Merged by pingou. Opened by pingou.
fix_split_diff  into  master

Download 3434.patch

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

@pingou Tests for this functionality need to be fixed.

Indeed, thanks for pointing it out

rebased onto 2596638cadb6da90a50f212bddd4fb666ddf6b9f

Turns out the issue wasn't in the code but in the logic, so the logic has been adjusted :)

rebased onto ea9ae020abbcb03189c167350d4aff4834c3242b

@pingou did the tests not run?

Pretty please pagure-ci rebuild

I ran them locally and they pass, but there is a bug in 4.0.3 (fixed in 4.0.4) that doesn't trigger jenkins on new commits/rebases.

rebased onto ed25f0afef0a21e187bb5bec61605e0e71e3d689

Pretty please pagure-ci rebuild

:thumbsup: from me

Thanks! :)

Pull-Request has been merged by pingou

Metadata