Skip to content

Commit a12503a

Browse files
authored
Merge pull request #2549 from remybohmer/master
[fix] Gitk fails to open on a bare Git repository on Windows
2 parents 14af9f9 + 448b5a9 commit a12503a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitk-git/gitk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12631,7 +12631,9 @@ set cdup {}
1263112631
if {[expr {[exec git rev-parse --is-inside-work-tree] == "true"}]} {
1263212632
set cdup [exec git rev-parse --show-cdup]
1263312633
}
12634-
set worktree [exec git rev-parse --show-toplevel]
12634+
if {$hasworktree} {
12635+
set worktree [exec git rev-parse --show-toplevel]
12636+
}
1263512637
setcoords
1263612638
makewindow
1263712639
if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix/etc/git.ico]} {

0 commit comments

Comments
 (0)