[fix] Gitk fails to open on a bare Git repository on Windows

Running 'git rev-parse --show-toplevel' fails on a bare git repo.
This causes gitk to fail to startup.

Signed-off-by: Remy Bohmer <github@bohmer.net>
This commit is contained in:
Remy Bohmer
2020-03-20 11:05:29 +01:00
committed by Johannes Schindelin
parent 5a2504ae12
commit d9bb41b42e

View File

@@ -12599,7 +12599,9 @@ set cdup {}
if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
set cdup [exec git rev-parse --show-cdup]
}
set worktree [exec git rev-parse --show-toplevel]
if {$hasworktree} {
set worktree [exec git rev-parse --show-toplevel]
}
setcoords
makewindow
catch {