Code

Merge branch 'master' of git://repo.or.cz/git/fastimport
[git.git] / gitk
diff --git a/gitk b/gitk
index 8132812b50cc7d387cf762851387c8dafff7e7b7..df1ce8cbbd3625d10e4660eb14c02ea9496c513b 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -309,9 +309,9 @@ proc readrefs {} {
     foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
        catch {unset $v}
     }
-    set refd [open [list | git ls-remote [gitdir]] r]
+    set refd [open [list | git show-ref] r]
     while {0 <= [set n [gets $refd line]]} {
-       if {![regexp {^([0-9a-f]{40})   refs/([^^]*)$} $line \
+       if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
            match id path]} {
            continue
        }
@@ -725,7 +725,7 @@ proc makewindow {} {
     bind . <Control-KP_Add> {incrfont 1}
     bind . <Control-minus> {incrfont -1}
     bind . <Control-KP_Subtract> {incrfont -1}
-    bind . <Destroy> {savestuff %W}
+    wm protocol . WM_DELETE_WINDOW doquit
     bind . <Button-1> "click %W"
     bind $fstring <Key-Return> dofind
     bind $sha1entry <Key-Return> gotocommit
@@ -829,12 +829,12 @@ proc savestuff {w} {
        puts $f [list set colors $colors]
        puts $f [list set diffcolors $diffcolors]
 
-        puts $f "set geometry(main) [winfo geometry .]"
+       puts $f "set geometry(main) [wm geometry .]"
        puts $f "set geometry(topwidth) [winfo width .tf]"
        puts $f "set geometry(topheight) [winfo height .tf]"
-       puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
-       puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
-       puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+       puts $f "set geometry(canv) [winfo width $canv]"
+       puts $f "set geometry(canv2) [winfo width $canv2]"
+       puts $f "set geometry(canv3) [winfo width $canv3]"
        puts $f "set geometry(botwidth) [winfo width .bleft]"
        puts $f "set geometry(botheight) [winfo height .bleft]"
 
@@ -5800,6 +5800,7 @@ proc showtag {tag isnew} {
 proc doquit {} {
     global stopped
     set stopped 100
+    savestuff .
     destroy .
 }