ed25f0 Fix splitting the diff per file

Authored and Committed by Pierre-Yves Chibon 5 years ago
    Fix splitting the diff per file
    
    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@pingoured.fr>
    
        
file modified
+5 -3