1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Show divergence from base branch in branches list

This commit is contained in:
Stefan Haller
2024-04-30 12:34:05 +02:00
parent 5b613f5bc7
commit 373b1970ca
11 changed files with 281 additions and 51 deletions

View File

@ -1,6 +1,9 @@
package models
import "fmt"
import (
"fmt"
"sync/atomic"
)
// Branch : A git branch
// duplicating this for now
@ -32,6 +35,11 @@ type Branch struct {
Subject string
// commit hash
CommitHash string
// How far we have fallen behind our base branch. 0 means either not
// determined yet, or up to date with base branch. (We don't need to
// distinguish the two, as we don't draw anything in both cases.)
BehindBaseBranch atomic.Int32
}
func (b *Branch) FullRefName() string {