mirror of
https://github.com/git/git.git
synced 2026-01-18 06:34:21 +00:00
git-gui: correctly restore GIT_DIR after invoking gitk
git-gui tries to temporary set GIT_DIR for starting gitk and restore it back after they are started. But in case of GIT_DIR which was not set prior to invocation it is not unset after it. This affects commands which can be later started from that git gui, for example "Git Bash". Fix it. Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
eb6afc451b
commit
00f7dda82b
@@ -2208,6 +2208,8 @@ proc do_gitk {revs {is_submodule false}} {
|
||||
|
||||
if {$old_GIT_DIR ne {}} {
|
||||
set env(GIT_DIR) $old_GIT_DIR
|
||||
} else {
|
||||
unset env(GIT_DIR)
|
||||
}
|
||||
cd $pwd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user