{"thread":{"id":"3756","subject":"[PATCH] gitk: Use git wrapper to run git-ls-remote.","startedAt":"2006-03-30T12:31:51Z","lastAt":"2006-03-30T23:20:05Z","messageCount":5,"participants":["Mark Wooding","Junio C Hamano","Christopher Faylor","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18145","messageId":"20060330123151.25779.73775.stgit@metalzone.distorted.org.uk","threadId":"3756","inReplyTo":null,"subject":"[PATCH] gitk: Use git wrapper to run git-ls-remote.","fromName":"Mark Wooding","fromEmail":"mdw@distorted.org.uk","sentAt":"2006-03-30T12:31:51Z","receivedAt":"2006-03-30T12:31:51Z","isPatch":true,"sender":{"key":"mdw@distorted.org.uk","avatar":null},"body":"From: Mark Wooding <mdw@distorted.org.uk>\n\nFor some reason, the Cygwin Tcl's `exec' command has trouble running\nscripts.  Fix this by using the C `git' wrapper.  Other GIT programs run\nby gitk are written in C already, so we don't need to incur a\nperformance hit of going via the wrapper (which I'll bet isn't pretty\nunder Cygwin).\n\nSigned-off-by: Mark Wooding <mdw@distorted.org.uk>\n---\n\n gitk |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex f4c6624..ac85d1c 100755\n--- a/gitk\n+++ b/gitk\n@@ -359,7 +359,7 @@ proc readrefs {} {\n     foreach v {tagids idtags headids idheads otherrefids idotherrefs} {\n \tcatch {unset $v}\n     }\n-    set refd [open [list | git-ls-remote [gitdir]] r]\n+    set refd [open [list | git ls-remote [gitdir]] r]\n     while {0 <= [set n [gets $refd line]]} {\n \tif {![regexp {^([0-9a-f]{40})\trefs/([^^]*)$} $line \\\n \t    match id path]} {\n"},{"id":"18152","messageId":"7v8xqr3iwt.fsf@assigned-by-dhcp.cox.net","threadId":"3756","inReplyTo":"20060330123151.25779.73775.stgit@metalzone.distorted.org.uk","subject":"Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-03-30T18:08:02Z","receivedAt":"2006-03-30T18:08:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Wooding <mdw@distorted.org.uk> writes:\n\n> From: Mark Wooding <mdw@distorted.org.uk>\n>\n> For some reason, the Cygwin Tcl's `exec' command has trouble running\n> scripts...\n\nYup, I've seen this and have a \"personal edition\" workaround\nexactly like yours.  I haven't bothered to put it in even \"pu\",\nbecause I am reluctant to add an workaround to a problem I do\nnot understand (and I haven't bothered to try understanding the\nproblem which happens only on Windows ;-).\n\nDoes anybody know what is going on?\n"},{"id":"18153","messageId":"slrne2o8lr.l0.mdw@metalzone.distorted.org.uk","threadId":"3756","inReplyTo":"7v8xqr3iwt.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.","fromName":"Mark Wooding","fromEmail":"mdw@distorted.org.uk","sentAt":"2006-03-30T18:26:03Z","receivedAt":"2006-03-30T18:26:03Z","isPatch":true,"sender":{"key":"mdw@distorted.org.uk","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n\n> Does anybody know what is going on?\n\nI'll try staring at the Tcl source code some time.  I'm rather too busy\ntonight, though.\n\nThere's also some very strange geometry management oddness going on in\ngitk.  I'll try to sort that out too.\n\n-- [mdw]\n"},{"id":"18155","messageId":"20060330201343.GH28682@trixie.casa.cgf.cx","threadId":"3756","inReplyTo":"7v8xqr3iwt.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.","fromName":"Christopher Faylor","fromEmail":"me@cgf.cx","sentAt":"2006-03-30T20:13:43Z","receivedAt":"2006-03-30T20:13:43Z","isPatch":true,"sender":{"key":"me@cgf.cx","avatar":null},"body":"On Thu, Mar 30, 2006 at 10:08:02AM -0800, Junio C Hamano wrote:\n>Mark Wooding <mdw@distorted.org.uk> writes:\n>\n>> From: Mark Wooding <mdw@distorted.org.uk>\n>>\n>> For some reason, the Cygwin Tcl's `exec' command has trouble running\n>> scripts...\n>\n>Yup, I've seen this and have a \"personal edition\" workaround\n>exactly like yours.  I haven't bothered to put it in even \"pu\",\n>because I am reluctant to add an workaround to a problem I do\n>not understand (and I haven't bothered to try understanding the\n>problem which happens only on Windows ;-).\n>\n>Does anybody know what is going on?\n\nCurrently, Cygwin's tcl is a pure windows version which uses\nCreateProcess to run stuff.  It doesn't know about scripts and possibly\ndoesn't even know about cygwin paths.\n\ncgf\n"},{"id":"18160","messageId":"Pine.LNX.4.63.0603310115480.2585@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3756","inReplyTo":"slrne2o8lr.l0.mdw@metalzone.distorted.org.uk","subject":"Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-03-30T23:20:05Z","receivedAt":"2006-03-30T23:20:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 30 Mar 2006, Mark Wooding wrote:\n\n> Junio C Hamano <junkio@cox.net> wrote:\n> \n> > Does anybody know what is going on?\n> \n> I'll try staring at the Tcl source code some time.  I'm rather too busy\n> tonight, though.\n> \n> There's also some very strange geometry management oddness going on in\n> gitk.  I'll try to sort that out too.\n\nThat has been discussed. My feeling is that this is a bug of Tk with \nregard to rootless X servers. I never came around to do a proper patch, \nbut I have explicit -height and -width arguments to all frames and \npanedwindows.\n\nIf you want to start working on it, I attached my current patch, which is \ngood enough for me, but note that it changes the geometry subtly everytime \ngitk is called...\n\nHth,\nDscho\n\n\n\n[PATCH] gitk: make geometry less weird on cygwin and macosx\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n gitk |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 03cd475..7339069 100755\n--- a/gitk\n+++ b/gitk\n@@ -373,13 +373,13 @@ proc makewindow {rargs} {\n \tset geometry(ctexth) [expr {($texth - 8) /\n \t\t\t\t    [font metrics $textfont -linespace]}]\n     }\n-    frame .ctop.top\n+    frame .ctop.top -height $geometry(canvh)\n     frame .ctop.top.bar\n     pack .ctop.top.bar -side bottom -fill x\n     set cscroll .ctop.top.csb\n     scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0\n     pack $cscroll -side right -fill y\n-    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4\n+    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4 -height $geometry(canvh)\n     pack .ctop.top.clist -side top -fill both -expand 1\n     .ctop add .ctop.top\n     set canv .ctop.top.clist.canv\n@@ -449,9 +449,10 @@ proc makewindow {rargs} {\n     # for making sure type==Exact whenever loc==Pickaxe\n     trace add variable findloc write findlocchange\n \n-    panedwindow .ctop.cdet -orient horizontal\n+    panedwindow .ctop.cdet -orient horizontal \\\n+\t-height [expr $geometry(ctexth)*$linespc+4]\n     .ctop add .ctop.cdet\n-    frame .ctop.cdet.left\n+    frame .ctop.cdet.left -width [expr $geometry(ctextw)*[font measure $textfont \"0\"]+8]\n     set ctext .ctop.cdet.left.ctext\n     text $ctext -bg white -state disabled -font $textfont \\\n \t-width $geometry(ctextw) -height $geometry(ctexth) \\\n"}]}