git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Prohaska <prohaska@zib.de>
To: git@vger.kernel.org
Cc: Steffen Prohaska <prohaska@zib.de>
Subject: [PATCH] git-gui: try to locate git in same directory as git-gui (on Windows)
Date: Sat,  6 Oct 2007 11:36:44 +0200	[thread overview]
Message-ID: <11916634041243-git-send-email-prohaska@zib.de> (raw)

This commit adds another guess where git might be located.
After searching PATH the last fallback is the directory
in which git-gui is installed. This is a good guess for
a sane installation.

Even if git is not included in PATH, git-gui is now able
to locate it. Hence git-gui can be passed to wish
as an absolute path without caring about the environment.

PATH is searched first and the location of git-gui only
as a last resort. Maybe the order should be reversed?

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-gui/git-gui.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 3f5927f..bb1e7f3 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -344,6 +344,7 @@ proc _which {what} {
 			set _search_exe .exe
 		} elseif {[is_Windows]} {
 			set _search_path [split $env(PATH) {;}]
+			lappend _search_path [file dirname [info script]]
 			set _search_exe .exe
 		} else {
 			set _search_path [split $env(PATH) :]
-- 
1.5.3.mingw.1.105.ga0fd0

             reply	other threads:[~2007-10-06  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06  9:36 Steffen Prohaska [this message]
2007-10-07 17:10 ` [PATCH] git-gui: try to locate git in same directory as git-gui (on Windows) Shawn O. Pearce

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=11916634041243-git-send-email-prohaska@zib.de \
    --to=prohaska@zib.de \
    --cc=git@vger.kernel.org \
    /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).