Skip to content

Commit a4bc299

Browse files
committed
Adds missing comment
Signed-off-by: Mario Lubenka <[email protected]>
1 parent 84e96ce commit a4bc299

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/git/repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ func checkDivergence(repoPath string, baseBranch string, targetBranch string) (i
329329
return outInteger, nil
330330
}
331331

332+
// GetDivergingCommits returns the number of commits a targetBranch is ahead or behind a baseBranch
332333
func GetDivergingCommits(repoPath string, baseBranch string, targetBranch string) (DivergeObject, error) {
333334
// $(git rev-list --count master..feature) commits ahead of master
334335
ahead, errorAhead := checkDivergence(repoPath, baseBranch, targetBranch)

templates/repo/branch/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
4747
</td>
4848
{{end}}
49-
<td class="ui commit-divergence" data-tooltip="{{.CommitsBehind}} commits behind {{$.DefaultBranch}}, {{.CommitsAhead}} commits ahead">
49+
<td class="ui">
5050
{{$totalCommits := addInteger .CommitsBehind .CommitsAhead}}
51-
<div class="bar-container">
51+
<div class="commit-divergence">
5252
<div class="bar-group">
5353
<div class="count count-behind">{{.CommitsBehind}}</div>
5454
<div class="bar bar-behind" style="width: {{percentage .CommitsBehind $totalCommits}}%"></div>

0 commit comments

Comments
 (0)