Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index ad0723ccc6..3e4452bc4b 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -274,6 +274,14 @@ webrick)
;;
esac
+init_browser_path() {
+ browser_path="`git config browser.$1.path`"
+ test -z "$browser_path" && browser_path="$1"
+}
+
start_httpd
url=http://127.0.0.1:$port
-test -n "$browser" && "$browser" $url || echo $url
+test -n "$browser" && {
+ init_browser_path "$browser"
+ "$browser_path" $url
+} || echo $url