1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

move git dir env stuff into a centralised package

This commit is contained in:
Jesse Duffield
2020-09-27 16:17:26 +10:00
parent e873816160
commit 75598ea2a1
6 changed files with 49 additions and 19 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/env"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@@ -23,8 +24,7 @@ func (gui *Gui) handleCreateRecentReposMenu() error {
yellow.Sprint(innerPath),
},
onPress: func() error {
os.Unsetenv("GIT_WORK_TREE")
os.Unsetenv("GIT_DIR")
env.UnsetGitDirEnvs()
if err := os.Chdir(innerPath); err != nil {
return err
}