Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
changchaishi committed Jan 11, 2025
1 parent 6e105e4 commit 845c70c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion routers/web/repo/view_home.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func prepareRecentlyPushedNewBranches(ctx *context.Context) {
continue
}
// Base is the pushed branch (for fork branch or local pushed branch perspective)
if divergingInfo.BaseIsNewer || divergingInfo.CommitsAhead > 0 {
if divergingInfo.BaseIsNewer || divergingInfo.CommitsBehind > 0 {
finalBranches = append(finalBranches, branch)
}
}
Expand Down
4 changes: 2 additions & 2 deletions services/repository/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ type BranchDivergingInfo struct {
}

// getBranchDivergingInfo returns the information about the divergence of a patch branch to the base branch.
func GetBranchDivergingInfo(ctx reqctx.RequestContext, baseRepo, headRepo *repo_model.Repository, baseBranch, headbranch string) (*BranchDivergingInfo, error) {
headGitBranch, err := git_model.GetBranch(ctx, headRepo.ID, headbranch)
func GetBranchDivergingInfo(ctx reqctx.RequestContext, baseRepo, headRepo *repo_model.Repository, baseBranch, headBranch string) (*BranchDivergingInfo, error) {
headGitBranch, err := git_model.GetBranch(ctx, headRepo.ID, headBranch)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 845c70c

Please sign in to comment.