In case of non-bare repos, the .git suffix in the path is skipped. Previously, when run in a subdirectory, gitk would show the name of this subdirectory as the title, which was misleading. --- gitk-git/gitk | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/gitk-git/gitk b/gitk-git/gitk index 4604c83..e656e81 100644 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -16,6 +16,14 @@ proc gitdir {} { } } +proc reponame {} { + set n [file normalize [gitdir]] + if {[string match "*/.git" $n]} { + set n [string range $n 0 end-5] + } + return $n +} + # A simple scheduler for compute-intensive stuff. # The aim is to make sure that event handlers for GUI actions can # run at least every 50-100 ms. Unfortunately fileevent handlers are @@ -11156,6 +11164,8 @@ set nullfile "/dev/null" set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}] set git_version [join [lrange [split [lindex [exec git version] end] .] 0 2] .] +set appname "gitk" + set runq {} set history {} set historyindex 0 @@ -11220,7 +11230,7 @@ catch { } # wait for the window to become visible tkwait visibility . -wm title . "[file tail $argv0]: [file tail [pwd]]" +wm title . "$appname: [reponame]" update readrefs -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html