Show deleted pull head information

This commit is contained in:
Lunny Xiao
2020-03-03 11:40:39 +08:00
parent e4a876cee1
commit 1abcd2fda1
12 changed files with 233 additions and 190 deletions

View File

@@ -235,8 +235,11 @@ func PushToBaseRepo(pr *models.PullRequest) (err error) {
log.Error("Unable to load head repository for PR[%d] Error: %v", pr.ID, err)
return err
}
headRepoPath := pr.HeadRepo.RepoPath()
if pr.HeadRepo == nil {
return models.ErrHeadRepoMissed{pr.ID, pr.HeadRepoID}
}
headRepoPath := pr.HeadRepo.RepoPath()
if err := git.Clone(headRepoPath, tmpBasePath, git.CloneRepoOptions{
Bare: true,
Shared: true,