Skip to content

Commit

Permalink
git-gui: correctly restore GIT_DIR after invoking gitk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
max630 authored and dscho committed Feb 4, 2017
1 parent ad9220b commit 660bc58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,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
Expand Down

0 comments on commit 660bc58

Please sign in to comment.