From: "Shawn O. Pearce" <spearce@spearce.org>
To: Steffen Prohaska <prohaska@zib.de>
Cc: Johannes.Schindelin@gmx.de, git@vger.kernel.org
Subject: Re: [PATCH] git-gui: add mingw specific startup wrapper
Date: Wed, 10 Oct 2007 02:22:18 -0400 [thread overview]
Message-ID: <20071010062218.GP2137@spearce.org> (raw)
In-Reply-To: <11919958073204-git-send-email-prohaska@zib.de>
Steffen Prohaska <prohaska@zib.de> wrote:
> The wrapper adds the directory it is installed in to PATH.
> This is required for the git commands implemented in shell.
> git-gui fails to launch them if PATH is not modified.
>
> The wrapper script also accepts an optional command line
> switch '--working-dir <dir>' and changes to <dir> before
> launching the actual git-gui. This is required to implement
> the "Git Gui Here" Explorer shell extension.
Nice.
> diff --git a/git-gui/Makefile b/git-gui/Makefile
> @@ -128,6 +128,7 @@ ifeq ($(uname_S),Darwin)
> endif
> ifneq (,$(findstring MINGW,$(uname_S)))
> NO_MSGFMT=1
> + GITGUI_WINDOWS_WRAPPER := YesPlease
> endif
I don't have this context in my Makefile so I can't apply this
additional line here. Can someone package up the patch that
introduces the MINGW case above with a proper commit message,
so I can apply it in front of this patch?
> install: all
> @@ -246,6 +257,9 @@ ifdef GITGUI_MACOSXAPP
> $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
> $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
> endif
> +ifdef GITGUI_WINDOWS_WRAPPER
> + $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
> +endif
> $(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
> $(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
> $(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
I think you missed the entry in the uninstall and clean targets.
> diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# Tcl ignores the next line -*- tcl -*- \
> +exec wish "$0" -- "$@"
> +
> +if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
> + cd [lindex $argv 1]
> + set argv [lrange $argv 2 end]
> + incr argc -2
> +}
Maybe we should just support this option directly in git-gui.
Today we also support doing something like this by setting the
GIT_DIR environment variable into a non-bare repository; see the
"# repository setup" block of git-gui.sh.
> +set gitguidir [file dirname [info script]]
> +regsub -all ";" $gitguidir "\\;" gitguidir
> +set env(PATH) "$gitguidir;$env(PATH)"
> +unset gitguidir
> +
> +source [file join [file dirname [info script]] git-gui.tcl]
Hmmph. The install target was going into libdir but the above
source doesn't seem to read from there, its loading from the same
location as the git-gui wrapper script. You msys guys probably
don't have $(libdir) == $(gitexecdir), do you?
--
Shawn.
next prev parent reply other threads:[~2007-10-10 6:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071010053728.GM2137@spearce.org>
2007-10-10 5:56 ` [PATCH] git-gui: add mingw specific startup wrapper Steffen Prohaska
2007-10-10 6:22 ` Shawn O. Pearce [this message]
2007-10-10 6:55 ` Steffen Prohaska
2007-10-10 6:58 ` [PATCH v2] git-gui: set NO_MSGFMT to force using pure tcl replacement in msysgit Steffen Prohaska
2007-10-10 6:58 ` [PATCH v2] git-gui: add mingw specific startup wrapper Steffen Prohaska
2007-10-10 8:02 ` Shawn O. Pearce
2007-10-10 15:56 ` Johannes Schindelin
2007-10-10 16:10 ` Steffen Prohaska
2007-10-10 15:52 ` [PATCH v2] git-gui: set NO_MSGFMT to force using pure tcl replacement in msysgit Johannes Schindelin
2007-10-10 15:58 ` Steffen Prohaska
2007-10-10 19:46 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071010062218.GP2137@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=prohaska@zib.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).