@ -358,7 +358,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C
}
compareInfo , err := ctx . Repo . GitRepo . GetCompareInfo ( ctx . Repo . Repository . RepoPath ( ) ,
baseCommit , pull . GetGitRefName ( ) , tru e, false )
baseCommit , pull . GetGitRefName ( ) , fals e, false )
if err != nil {
if strings . Contains ( err . Error ( ) , "fatal: Not a valid object name" ) || strings . Contains ( err . Error ( ) , "unknown revision or path not in the working tree" ) {
ctx . Data [ "IsPullRequestBroken" ] = true
@ -441,7 +441,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
}
compareInfo , err := baseGitRepo . GetCompareInfo ( pull . BaseRepo . RepoPath ( ) ,
pull . MergeBase , pull . GetGitRefName ( ) , tru e, false )
pull . MergeBase , pull . GetGitRefName ( ) , fals e, false )
if err != nil {
if strings . Contains ( err . Error ( ) , "fatal: Not a valid object name" ) {
ctx . Data [ "IsPullRequestBroken" ] = true
@ -557,7 +557,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
}
compareInfo , err := baseGitRepo . GetCompareInfo ( pull . BaseRepo . RepoPath ( ) ,
git . BranchPrefix + pull . BaseBranch , pull . GetGitRefName ( ) , tru e, false )
git . BranchPrefix + pull . BaseBranch , pull . GetGitRefName ( ) , fals e, false )
if err != nil {
if strings . Contains ( err . Error ( ) , "fatal: Not a valid object name" ) {
ctx . Data [ "IsPullRequestBroken" ] = true