Serve pull request .diff files (#3293)

* Serve pull request .diff files

Closes #3259

* Add test for pull request redirection and .diff access

* Typo

* There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
This commit is contained in:
Sandro Santilli authored and Lauris BH committed 2018-01-05 12:56:52 +02:00
1 parent ce7ae17b81
commit a192f3052e
4 files changed
+53 -5

No files matched your search

+3 -1
View File
@@ -570,7 +570,9 @@ func (repo *Repository) GetMirror() (err error) {
return err
}
// GetBaseRepo returns the base repository
// GetBaseRepo populates repo.BaseRepo for a fork repository and
// returns an error on failure (NOTE: no error is returned for
// non-fork repositories, and BaseRepo will be left untouched)
func (repo *Repository) GetBaseRepo() (err error) {
if !repo.IsFork {
return nil