Skip to content

Commit f62e13e

Browse files
committed
fix
1 parent ab7751b commit f62e13e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

services/repository/branch.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,11 @@ func GetBranchDivergingInfo(ctx reqctx.RequestContext, baseRepo, headRepo *repo_
685685
if err != nil {
686686
return nil, err
687687
}
688-
hasPreviousCommit, _ := headCommit.HasPreviousCommit(baseGitBranch.CommitID)
688+
baseCommitID, err := git.NewIDFromString(baseGitBranch.CommitID)
689+
if err != nil {
690+
return nil, err
691+
}
692+
hasPreviousCommit, _ := headCommit.HasPreviousCommit(baseCommitID)
689693
info.BaseHasNewCommits = !hasPreviousCommit
690694
return info, nil
691695
}

0 commit comments

Comments
 (0)