summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-04-05 02:14:17 (GMT)
committerPaul Mackerras <paulus@samba.org>2011-07-24 05:34:54 (GMT)
commitda616db5e56a735ab3028c33b19af5136420dcb9 (patch)
tree0a4e0043acd946a64729e7d4b1eb364ce519bee7 /gitk
parent929f577e0a648dd1c90b92d8a3f6f1899f2fa0e2 (diff)
downloadgit-da616db5e56a735ab3028c33b19af5136420dcb9.zip
git-da616db5e56a735ab3028c33b19af5136420dcb9.tar.gz
git-da616db5e56a735ab3028c33b19af5136420dcb9.tar.bz2
gitk: Run 'git rev-parse --git-dir' only once
It seems like gitk has been setting the global variable 'gitdir' at startup since aa81d97 (gitk: Fix Update menu item, 2006-02-28). It should therefore no longer be necessary to call the procedure with the same name (more than once to set the global variable). Remove the other call sites and use the global variable instead. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitk b/gitk
index e263b49..3872b76 100755
--- a/gitk
+++ b/gitk
@@ -9059,6 +9059,7 @@ proc exec_citool {tool_args {baseid {}}} {
proc cherrypick {} {
global rowmenuid curview
global mainhead mainheadid
+ global gitdir
set oldhead [exec git rev-parse HEAD]
set dheads [descheads $rowmenuid]
@@ -9087,7 +9088,7 @@ proc cherrypick {} {
conflict.\nDo you wish to run git citool to\
resolve it?"]]} {
# Force citool to read MERGE_MSG
- file delete [file join [gitdir] "GITGUI_MSG"]
+ file delete [file join $gitdir "GITGUI_MSG"]
exec_citool {} $rowmenuid
}
} else {
@@ -9453,6 +9454,7 @@ proc refill_reflist {} {
proc getallcommits {} {
global allcommits nextarc seeds allccache allcwait cachedarcs allcupdate
global idheads idtags idotherrefs allparents tagobjid
+ global gitdir
if {![info exists allcommits]} {
set nextarc 0
@@ -9460,7 +9462,7 @@ proc getallcommits {} {
set seeds {}
set allcwait 0
set cachedarcs 0
- set allccache [file join [gitdir] "gitk.cache"]
+ set allccache [file join $gitdir "gitk.cache"]
if {![catch {
set f [open $allccache r]
set allcwait 1