diff options
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r-- | routers/repo/branch.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go index 5d78518491..0c06de3ea6 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -28,6 +28,7 @@ type Branch struct { Commit *git.Commit IsProtected bool IsDeleted bool + IsIncluded bool DeletedBranch *models.DeletedBranch CommitsAhead int CommitsBehind int @@ -203,10 +204,13 @@ func loadBranches(ctx *context.Context) []*Branch { } } + isIncluded := divergence.Ahead == 0 && ctx.Repo.Repository.DefaultBranch != branchName + branches[i] = &Branch{ Name: branchName, Commit: commit, IsProtected: isProtected, + IsIncluded: isIncluded, CommitsAhead: divergence.Ahead, CommitsBehind: divergence.Behind, LatestPullRequest: pr, |