From 23626755d7d4ae3573d25ad73db7bf5be0c495f2 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 27 Sep 2020 15:52:28 +1000 Subject: [PATCH] unset GIT_WORK_TREE and GIT_DIR when switching repos --- pkg/gui/recent_repos_panel.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/gui/recent_repos_panel.go b/pkg/gui/recent_repos_panel.go index d9174e0d1..dba8ac260 100644 --- a/pkg/gui/recent_repos_panel.go +++ b/pkg/gui/recent_repos_panel.go @@ -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 }