Skip to content

Commit

Permalink
[fix] Gitk fails to open on a bare Git repository on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
remybohmer authored and dscho committed Apr 18, 2020
1 parent 47e3cdd commit 17d664a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gitk-git/gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 17d664a

Please sign in to comment.