git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] gitk: Use git wrapper to run git-ls-remote.
@ 2006-03-30 12:31 Mark Wooding
  2006-03-30 18:08 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Wooding @ 2006-03-30 12:31 UTC (permalink / raw
  To: git

From: Mark Wooding <mdw@distorted.org.uk>

For some reason, the Cygwin Tcl's `exec' command has trouble running
scripts.  Fix this by using the C `git' wrapper.  Other GIT programs run
by gitk are written in C already, so we don't need to incur a
performance hit of going via the wrapper (which I'll bet isn't pretty
under Cygwin).

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
---

 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index f4c6624..ac85d1c 100755
--- a/gitk
+++ b/gitk
@@ -359,7 +359,7 @@ 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 ls-remote [gitdir]] r]
     while {0 <= [set n [gets $refd line]]} {
 	if {![regexp {^([0-9a-f]{40})	refs/([^^]*)$} $line \
 	    match id path]} {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.
  2006-03-30 12:31 [PATCH] gitk: Use git wrapper to run git-ls-remote Mark Wooding
@ 2006-03-30 18:08 ` Junio C Hamano
  2006-03-30 18:26   ` Mark Wooding
  2006-03-30 20:13   ` Christopher Faylor
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2006-03-30 18:08 UTC (permalink / raw
  To: Mark Wooding; +Cc: git

Mark Wooding <mdw@distorted.org.uk> writes:

> From: Mark Wooding <mdw@distorted.org.uk>
>
> For some reason, the Cygwin Tcl's `exec' command has trouble running
> scripts...

Yup, I've seen this and have a "personal edition" workaround
exactly like yours.  I haven't bothered to put it in even "pu",
because I am reluctant to add an workaround to a problem I do
not understand (and I haven't bothered to try understanding the
problem which happens only on Windows ;-).

Does anybody know what is going on?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.
  2006-03-30 18:08 ` Junio C Hamano
@ 2006-03-30 18:26   ` Mark Wooding
  2006-03-30 23:20     ` Johannes Schindelin
  2006-03-30 20:13   ` Christopher Faylor
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Wooding @ 2006-03-30 18:26 UTC (permalink / raw
  To: git

Junio C Hamano <junkio@cox.net> wrote:

> Does anybody know what is going on?

I'll try staring at the Tcl source code some time.  I'm rather too busy
tonight, though.

There's also some very strange geometry management oddness going on in
gitk.  I'll try to sort that out too.

-- [mdw]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.
  2006-03-30 18:08 ` Junio C Hamano
  2006-03-30 18:26   ` Mark Wooding
@ 2006-03-30 20:13   ` Christopher Faylor
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2006-03-30 20:13 UTC (permalink / raw
  To: Junio C Hamano, Mark Wooding, git

On Thu, Mar 30, 2006 at 10:08:02AM -0800, Junio C Hamano wrote:
>Mark Wooding <mdw@distorted.org.uk> writes:
>
>> From: Mark Wooding <mdw@distorted.org.uk>
>>
>> For some reason, the Cygwin Tcl's `exec' command has trouble running
>> scripts...
>
>Yup, I've seen this and have a "personal edition" workaround
>exactly like yours.  I haven't bothered to put it in even "pu",
>because I am reluctant to add an workaround to a problem I do
>not understand (and I haven't bothered to try understanding the
>problem which happens only on Windows ;-).
>
>Does anybody know what is going on?

Currently, Cygwin's tcl is a pure windows version which uses
CreateProcess to run stuff.  It doesn't know about scripts and possibly
doesn't even know about cygwin paths.

cgf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.
  2006-03-30 18:26   ` Mark Wooding
@ 2006-03-30 23:20     ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2006-03-30 23:20 UTC (permalink / raw
  To: Mark Wooding; +Cc: git

[-- Attachment #1: Type: TEXT/PLAIN, Size: 752 bytes --]

Hi,

On Thu, 30 Mar 2006, Mark Wooding wrote:

> Junio C Hamano <junkio@cox.net> wrote:
> 
> > Does anybody know what is going on?
> 
> I'll try staring at the Tcl source code some time.  I'm rather too busy
> tonight, though.
> 
> There's also some very strange geometry management oddness going on in
> gitk.  I'll try to sort that out too.

That has been discussed. My feeling is that this is a bug of Tk with 
regard to rootless X servers. I never came around to do a proper patch, 
but I have explicit -height and -width arguments to all frames and 
panedwindows.

If you want to start working on it, I attached my current patch, which is 
good enough for me, but note that it changes the geometry subtly everytime 
gitk is called...

Hth,
Dscho


[-- Attachment #2: Type: TEXT/plain, Size: 1642 bytes --]

[PATCH] gitk: make geometry less weird on cygwin and macosx

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 gitk |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gitk b/gitk
index 03cd475..7339069 100755
--- a/gitk
+++ b/gitk
@@ -373,13 +373,13 @@ proc makewindow {rargs} {
 	set geometry(ctexth) [expr {($texth - 8) /
 				    [font metrics $textfont -linespace]}]
     }
-    frame .ctop.top
+    frame .ctop.top -height $geometry(canvh)
     frame .ctop.top.bar
     pack .ctop.top.bar -side bottom -fill x
     set cscroll .ctop.top.csb
     scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
     pack $cscroll -side right -fill y
-    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4
+    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4 -height $geometry(canvh)
     pack .ctop.top.clist -side top -fill both -expand 1
     .ctop add .ctop.top
     set canv .ctop.top.clist.canv
@@ -449,9 +449,10 @@ proc makewindow {rargs} {
     # for making sure type==Exact whenever loc==Pickaxe
     trace add variable findloc write findlocchange
 
-    panedwindow .ctop.cdet -orient horizontal
+    panedwindow .ctop.cdet -orient horizontal \
+	-height [expr $geometry(ctexth)*$linespc+4]
     .ctop add .ctop.cdet
-    frame .ctop.cdet.left
+    frame .ctop.cdet.left -width [expr $geometry(ctextw)*[font measure $textfont "0"]+8]
     set ctext .ctop.cdet.left.ctext
     text $ctext -bg white -state disabled -font $textfont \
 	-width $geometry(ctextw) -height $geometry(ctexth) \

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-30 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 12:31 [PATCH] gitk: Use git wrapper to run git-ls-remote Mark Wooding
2006-03-30 18:08 ` Junio C Hamano
2006-03-30 18:26   ` Mark Wooding
2006-03-30 23:20     ` Johannes Schindelin
2006-03-30 20:13   ` Christopher Faylor

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).