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

[PATCH 3/3] git-gui (Windows): Change wrapper to execdir 'libexec/git-core'

From
Steffen Prohaska <prohaska@zib.de>
Date
Jul 27, 2008, 16:49 UTC
Message-ID
<1217177383-25272-4-git-send-email-prohaska@zib.de>
In-Reply-To
<1217177383-25272-3-git-send-email-prohaska@zib.de>

git-gui needs bindir in PATH to be able to run 'git'. bindir however is not necessarily in PATH if started directly through a Windows shortcut. Therefore, we used to add the directory git-gui is located in. But with the new 'libexec/git-core' layout this directory is no longer identical to bindir.

This commit modifies the wrapper script to discover the bindir and add it to PATH.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-gui/windows/git-gui.sh |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh
index 98f32c0..53c3a94 100644
--- a/git-gui/windows/git-gui.sh
+++ b/git-gui/windows/git-gui.sh
@@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
 	incr argc -2
 }
 
-set gitguidir [file dirname [info script]]
-regsub -all ";" $gitguidir "\\;" gitguidir
-set env(PATH) "$gitguidir;$env(PATH)"
-unset gitguidir
+set bindir [file dirname \
+            [file dirname \
+             [file dirname [info script]]]]
+set bindir [file join $bindir bin]
+regsub -all ";" $bindir "\\;" bindir
+set env(PATH) "$bindir;$env(PATH)"
+unset bindir
 
 source [file join [file dirname [info script]] git-gui.tcl]
-- 
1.6.0.rc0.79.gb0320
Previous: Steffen ProhaskaNext: Shawn O. Pearce
Message 4 of 13 in “git-gui (Windows): Adapt to new execdir 'libexec/git-core'”
  1. 0/3 git-gui (Windows): Adapt to new execdir 'libexec/git-core'Steffen Prohaska, Jul 27, 2008
  2. 1/3 git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'Steffen Prohaska, Jul 27, 2008
  3. 2/3 git-gui (Windows): Switch to relative discovery of oguilibSteffen Prohaska, Jul 27, 2008
  4. 3/3 git-gui (Windows): Change wrapper to execdir 'libexec/git-core'Steffen Prohaska, Jul 27, 2008
  5. Shawn O. PearceJul 27, 2008
  6. Steffen ProhaskaJul 28, 2008
  7. Shawn O. PearceJul 30, 2008
  8. Steffen ProhaskaJul 30, 2008
  9. Johannes SixtAug 3, 2008
  10. Steffen ProhaskaAug 3, 2008
  11. git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'Johannes Sixt, Aug 4, 2008
  12. Shawn O. PearceAug 4, 2008
  13. git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'Johannes Sixt, Aug 4, 2008

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.