Skip to content

Commit 3d12ff3

Browse files
authored
try to remove unused code
1 parent 85e2cce commit 3d12ff3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/repository/branch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,11 @@ func GetBranchDivergingInfo(ctx reqctx.RequestContext, baseRepo, headRepo *repo_
677677
return info, nil
678678
}
679679
// if the base's update time is before the fork, check whether the base's head is in the fork
680-
baseGitRepo, err := gitrepo.RepositoryFromRequestContextOrOpen(ctx, baseRepo)
680+
headGitRepo, err := gitrepo.RepositoryFromRequestContextOrOpen(ctx, headRepo)
681681
if err != nil {
682682
return nil, err
683683
}
684-
headGitRepo, err := gitrepo.RepositoryFromRequestContextOrOpen(ctx, headRepo)
684+
headCommit, err := headGitRepo.GetCommit(headGitBranch.CommitID)
685685
if err != nil {
686686
return nil, err
687687
}

0 commit comments

Comments
 (0)