Add option RefToShowDivergenceFrom to GetCommitsOptions

Not used yet.
This commit is contained in:
Stefan Haller 2023-08-05 11:50:11 +02:00
parent 911aa7774b
commit 12f24aa8b4
3 changed files with 61 additions and 14 deletions

View file

@ -30,6 +30,17 @@ const (
ActionConflict = todo.Comment + 1
)
type Divergence int
// For a divergence log (left/right comparison of two refs) this is set to
// either DivergenceLeft or DivergenceRight for each commit; for normal
// commit views it is always DivergenceNone.
const (
DivergenceNone Divergence = iota
DivergenceLeft
DivergenceRight
)
// Commit : A git commit
type Commit struct {
Sha string
@ -41,6 +52,7 @@ type Commit struct {
AuthorName string // something like 'Jesse Duffield'
AuthorEmail string // something like 'jessedduffield@gmail.com'
UnixTimestamp int64
Divergence Divergence // set to DivergenceNone unless we are showing the divergence view
// SHAs of parent commits (will be multiple if it's a merge commit)
Parents []string