git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Re: [PATCH 2/3] git-gui: fix PATH environment for mingw development environment

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Feb 28, 2010, 12:46 UTC
Message-ID
<20100228124645.GB35071@book.hvoigt.net>
In-Reply-To
<a5b261831002271657n41ab0f37sc0af50d3a768bfd1@mail.gmail.com>
On Sun, Feb 28, 2010 at 12:57:14AM +0000, Pat Thoyts wrote:
Show 13 quoted lines
> On 27 February 2010 20:47, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> > When creating a desktop shortcut from the gui the shortcut directly
> > starts wish with the git-gui script. In the msysgit development
> > environment some dll's reside in the mingw/bin directory which causes
> > that git can not start because libiconv2.dll is not found.
> >
> > When using such a link the error is even more cryptic stating:
> > "child killed: unknown signal"
> >
> > Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
> > ---
> > I am not sure whether this is the most elegant solution, but making this
> > work would definitely ease the development workflow.
[...]
Show 7 quoted lines
> > -set bindir [file dirname \
> > +set basedir [file dirname \
> >             [file dirname \
> >              [file dirname [info script]]]]
> > -set bindir [file join $bindir bin]
> > +set bindir [file join $basedir bin]
> > +set bindir "$bindir;[file join $basedir mingw bin]"
[...]
Show 9 quoted lines
> I have not tried to test this - I use cmd shell all the time so I
> always run this using 'git gui' which runs the git.cmd script in
> ProgramFiles\Git\cmd or in the development environment in
> msysgit\cmd\. It makes me wonder if the Windows shortcut shouldn;t be
> pointing to the cmd script rather than to a tcl script like this as
> the cmd script does some quite extensive environment setup. It assigns
> HOME if it is not set, extends the PATH to include the git
> installation locations, sets the PLINK_PROTOCOL and the codepages for
> the console.

Problem here is that AFAIK the cmd script is part of msysgit and not upstream git which would break the desktop icon on cygwin. So this solution seems to me the most unintrusive one because on cygwin (and installed msysgit) you just end up having one obsolete path in PATH. And the current heuristic does not always work. Depending on where you put your prefix variable in your make call you have to manually add to your path. For example if you, like me, usually install git in your home directory.

Of course if we had a way to tell where the dll's of git are stored that would be a way nicer solution.

Show 5 quoted lines
> Probably only the PATH and HOME fixups are necessary for
> git-gui and in fact tcl's configuration of "~" in the path as HOME
> probably deals with that too.
> This is just for the development setup right? An installation of
> msysGit doesn't have a mingw\bin directory.

Yes it is for development only. But we have this paths in other locations as well: For example I noticed that even the installation of msysgit has /mingw/bin in PATH (from etc/profile probably) when starting git bash.

We need something for the development setup. Otherwise testing bugfixes in this area becomes very tedious. And as stated above the error message you get is way worse than my patch ;)

cheers Heiko
Previous: Pat ThoytsNext: Heiko Voigt
Message 9 of 12 in “git gui create desktop icon currently does not work”
  1. Heiko VoigtFeb 23, 2010
  2. Giuseppe BilottaFeb 23, 2010
  3. Heiko VoigtFeb 23, 2010
  4. Giuseppe BilottaFeb 25, 2010
  5. Heiko VoigtFeb 27, 2010
  6. 1/3 git-gui: fix usage of _gitworktree when creating shortcut for windowsHeiko Voigt, Feb 27, 2010
  7. 2/3 git-gui: fix PATH environment for mingw development environmentHeiko Voigt, Feb 27, 2010
  8. Pat ThoytsFeb 28, 2010
  9. Heiko VoigtFeb 28, 2010
  10. 3/3 git-gui: fix shortcut creation on cygwinHeiko Voigt, Feb 27, 2010
  11. Johannes SchindelinMar 8, 2010
  12. Giuseppe BilottaFeb 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.