diff options
Diffstat (limited to 'pkg/integration/components/git.go')
-rw-r--r-- | pkg/integration/components/git.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/integration/components/git.go b/pkg/integration/components/git.go index ed327b3ed..1e2975be2 100644 --- a/pkg/integration/components/git.go +++ b/pkg/integration/components/git.go @@ -2,7 +2,10 @@ package components import ( "fmt" + "log" "strings" + + "github.com/jesseduffield/lazygit/pkg/commands/git_commands" ) type Git struct { @@ -44,3 +47,11 @@ func (self *Git) expect(cmdArgs []string, condition func(string) (bool, string)) return self } + +func (self *Git) Version() *git_commands.GitVersion { + version, err := getGitVersion() + if err != nil { + log.Fatalf("Could not get git version: %v", err) + } + return version +} |