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

[PATCH 1/2] git-web--browse: Fix check for /bin/start

From
Todd Zullinger <tmz@pobox.com>
Date
Feb 8, 2009, 23:12 UTC
Message-ID
<e44161a223e7ec2cfb1f1b71399b995626c2d208.1234127422.git.tmz@pobox.com>

The previous check in git-web--browse for /bin/start used test -n /bin/start, which was always true. This lead to "start" being tried first in the browser list. On systems with upstart installed, "start" exists and might be in the PATH, but it makes a poor choice for a web browser. Instead, test that /bin/start exists and is executable.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---

This test is still a bit fragile, as it relies on the start from upstart not being installed in /bin. I don't know if that's something we can count on or not. If not, the test needs to be extended to differentiate between the MingW's start and upstart's start. Does the MingW start have a --version string or something we could check before adding start to the list?

 git-web--browse.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 78d236b..7ed0fad 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -115,7 +115,7 @@ if test -z "$browser" ; then
 	browser_candidates="open $browser_candidates"
     fi
     # /bin/start indicates MinGW
-    if test -n /bin/start; then
+    if test -x /bin/start; then
 	browser_candidates="start $browser_candidates"
     fi
-- 
1.6.1.3

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Honesty is the best policy, but insanity is a better defense.
Next: Todd Zullinger
Message 1 of 2 in “git-web--browse: Fix check for /bin/start”
  1. 1/2 git-web--browse: Fix check for /bin/startTodd Zullinger, Feb 8, 2009
  2. 2/2 git-web--browse: Use xdg-open if it is availableTodd Zullinger, Feb 8, 2009

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.