5efe838 Fix seeing the diff on closed PR and deleted forks

Authored and Committed by pingou 5 years ago
    Fix seeing the diff on closed PR and deleted forks
    
    Basically, we were looking at the fork to generate the diff of the
    PR, but if the forks has been deleted and later re-created the
    commits are gone from the forks, so the diff appears empty.
    If we switch from using the fork to using the target project, since
    we pulled the object in the target repo when creating the refs
    refs/pull/<id>/head, it will work just fine.
    This is what this commit does, it moves the logic of the diff from
    the fork repo to the target repo.
    
    Thanks to Slavek Kabrda to pointing this one out and figuring out
    the fix.
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
    
        
file modified
+4 -4