summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2022-12-26 23:43:08 +0900
committerRyooooooga <eial5q265e5@gmail.com>2022-12-30 20:01:14 +0900
commitcd9111837e3e331cc0da7e52f8a0be9af266c7f5 (patch)
tree1b33e6ec8b383d4936f988bd981c3b313e59e4f2 /pkg/gui/gui.go
parent41222f07edc9d55dc43a0f5b4b8f865568271ae7 (diff)
feat: add `GitVersion` struct
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 7475476c4..4e15af94e 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -76,9 +76,10 @@ type Repo string
// Gui wraps the gocui Gui object which handles rendering and events
type Gui struct {
*common.Common
- g *gocui.Gui
- git *commands.GitCommand
- os *oscommands.OSCommand
+ g *gocui.Gui
+ gitVersion *git_commands.GitVersion
+ git *commands.GitCommand
+ os *oscommands.OSCommand
// this is the state of the GUI for the current repo
State *GuiRepoState
@@ -222,6 +223,7 @@ func (gui *Gui) onNewRepo(startArgs appTypes.StartArgs, reuseState bool) error {
var err error
gui.git, err = commands.NewGitCommand(
gui.Common,
+ gui.gitVersion,
gui.os,
git_config.NewStdCachedGitConfig(gui.Log),
gui.Mutexes.SyncMutex,
@@ -341,12 +343,14 @@ func initialContext(contextTree *context.ContextTree, startArgs appTypes.StartAr
func NewGui(
cmn *common.Common,
config config.AppConfigurer,
+ gitVersion *git_commands.GitVersion,
updater *updates.Updater,
showRecentRepos bool,
initialDir string,
) (*Gui, error) {
gui := &Gui{
Common: cmn,
+ gitVersion: gitVersion,
Config: config,
Updater: updater,
statusManager: &statusManager{},