Skip to content

Commit 7cf2868

Browse files
committed
Merge pull request #1032 from max630/gitgui_GIT_GIT_unset
git-gui: correctly restore GIT_DIR after invoking commands
2 parents 62ff4f7 + f4bd663 commit 7cf2868

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-gui/git-gui.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,6 +2212,8 @@ proc do_gitk {revs {is_submodule false}} {
22122212
22132213
if {$old_GIT_DIR ne {}} {
22142214
set env(GIT_DIR) $old_GIT_DIR
2215+
} else {
2216+
unset env(GIT_DIR)
22152217
}
22162218
cd $pwd
22172219

0 commit comments

Comments
 (0)