diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-19 18:32:27 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-22 10:48:51 +1100 |
commit | 4ab5e5413944a92699a9540148666f0de26aa44b (patch) | |
tree | 58a4b648b5a4e5a6ed5f01b4e40ae5ba3c3ebad7 /pkg/commands/models | |
parent | ab84410b4155bcee73ead0e2a7510924575b1323 (diff) |
add support for git bisect
Diffstat (limited to 'pkg/commands/models')
-rw-r--r-- | pkg/commands/models/commit.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/commands/models/commit.go b/pkg/commands/models/commit.go index 1b8659e77..330c525dc 100644 --- a/pkg/commands/models/commit.go +++ b/pkg/commands/models/commit.go @@ -1,6 +1,10 @@ package models -import "fmt" +import ( + "fmt" + + "github.com/jesseduffield/lazygit/pkg/utils" +) // Commit : A git commit type Commit struct { @@ -18,10 +22,7 @@ type Commit struct { } func (c *Commit) ShortSha() string { - if len(c.Sha) < 8 { - return c.Sha - } - return c.Sha[:8] + return utils.ShortSha(c.Sha) } func (c *Commit) RefName() string { |