{"thread":{"id":"10167","subject":"[PATCH] git-gui: try to locate git in same directory as git-gui (on Windows)","startedAt":"2007-10-06T09:36:44Z","lastAt":"2007-10-07T17:10:43Z","messageCount":2,"participants":["Steffen Prohaska","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"55014","messageId":"11916634041243-git-send-email-prohaska@zib.de","threadId":"10167","inReplyTo":null,"subject":"[PATCH] git-gui: try to locate git in same directory as git-gui (on Windows)","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-06T09:36:44Z","receivedAt":"2007-10-06T09:36:44Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"This commit adds another guess where git might be located.\nAfter searching PATH the last fallback is the directory\nin which git-gui is installed. This is a good guess for\na sane installation.\n\nEven if git is not included in PATH, git-gui is now able\nto locate it. Hence git-gui can be passed to wish\nas an absolute path without caring about the environment.\n\nPATH is searched first and the location of git-gui only\nas a last resort. Maybe the order should be reversed?\n\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n git-gui/git-gui.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 3f5927f..bb1e7f3 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -344,6 +344,7 @@ proc _which {what} {\n \t\t\tset _search_exe .exe\n \t\t} elseif {[is_Windows]} {\n \t\t\tset _search_path [split $env(PATH) {;}]\n+\t\t\tlappend _search_path [file dirname [info script]]\n \t\t\tset _search_exe .exe\n \t\t} else {\n \t\t\tset _search_path [split $env(PATH) :]\n-- \n1.5.3.mingw.1.105.ga0fd0\n"},{"id":"55073","messageId":"20071007171043.GY2137@spearce.org","threadId":"10167","inReplyTo":"11916634041243-git-send-email-prohaska@zib.de","subject":"Re: [PATCH] git-gui: try to locate git in same directory as git-gui (on Windows)","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-07T17:10:43Z","receivedAt":"2007-10-07T17:10:43Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> wrote:\n> This commit adds another guess where git might be located.\n> After searching PATH the last fallback is the directory\n> in which git-gui is installed. This is a good guess for\n> a sane installation.\n\nThanks.\n \n-- \nShawn.\n"}]}