Re: [PATCH] Allow gitk to start on Cygwin with native Win32 Tcl/Tk
From: Mark Levedahl <hidden>
Date: 2016-06-15 22:43:43
Paul Mackerras wrote:
Shawn O. Pearce writes:quoted
Yes, I admit this is an odd patch. I can certainly carry it in my own tree (I already carry some other patches) but I wonder if we shouldn't include it as some users may actually try to do this, just like I did. Latest git-gui `master` already has changes to its Makefile and shell startup boilerplate to handle this weird case.Why do you need to change gitk itself? If you're going to modify it with sed, why can't you change the $0 on the 3rd line to the installed path of the gitk script?
While gitk is most likely installed as /usr/bin/gitk in Cygwin's filespace, that could resolve to anything in the Windows file system. It might be c:\cygwin\usr\bin\gitk, but could also be "d:\Documents and Settings\Bill\Programs\cygwin\usr\bin\gitk" depending upon who installed it and with what options. Both are seen as /usr/bin/gitk by Cygwin. Thus, Shawn is correct in using cygpath to resolve the name. Also, as Cygwin's tcl/tk package is bound to the port of the insight debugger to Cygwin, and that project is stuck for years on 8.4.1, this patch (or something like it) may be the only way to allow gitk to access a more recent version on Cygwin in the foreseeable future. So, I think this is a good idea. Mark