forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option RefToShowDivergenceFrom to GetCommitsOptions
Not used yet.
- Loading branch information
1 parent
911aa77
commit 12f24aa
Showing
3 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 '[email protected]' | ||
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 | ||
|