ssahani / pagure

Forked from pagure 5 years ago
Clone

ed25f0a Fix splitting the diff per file

Authored and Committed by pingou 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>
    
        
file modified
+5 -3