1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

unset GIT_WORK_TREE and GIT_DIR when switching repos

This commit is contained in:
Jesse Duffield 2020-09-27 15:52:28 +10:00
parent 97af7e677b
commit 23626755d7

View File

@ -23,6 +23,8 @@ func (gui *Gui) handleCreateRecentReposMenu() error {
yellow.Sprint(innerPath),
},
onPress: func() error {
os.Unsetenv("GIT_WORK_TREE")
os.Unsetenv("GIT_DIR")
if err := os.Chdir(innerPath); err != nil {
return err
}