{"thread":{"id":"11781","subject":"[PATCH 3/3] instaweb: use 'browser.<tool>.path' config option if it's set.","startedAt":"2008-01-29T06:08:44Z","lastAt":"2008-01-29T08:46:18Z","messageCount":2,"participants":["Christian Couder","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"66813","messageId":"20080129070844.30781cd3.chriscool@tuxfamily.org","threadId":"11781","inReplyTo":null,"subject":"[PATCH 3/3] instaweb: use 'browser.<tool>.path' config option if it's set.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-01-29T06:08:44Z","receivedAt":"2008-01-29T06:08:44Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n Documentation/config.txt |    3 ++-\n git-instaweb.sh          |   10 +++++++++-\n 2 files changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 477b2d9..4e222f1 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -369,7 +369,8 @@ branch.<name>.rebase::\n \n browser.<tool>.path::\n \tOverride the path for the given tool that may be used to\n-\tbrowse HTML help. See '-w' option in linkgit:git-help[1].\n+\tbrowse HTML help (see '-w' option in linkgit:git-help[1]) or a\n+\tworking repository in gitweb (see linkgit:git-instaweb[1]).\n \n clean.requireForce::\n \tA boolean to make git-clean do nothing unless given -f\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex ad0723c..3e4452b 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -274,6 +274,14 @@ webrick)\n \t;;\n esac\n \n+init_browser_path() {\n+\tbrowser_path=\"`git config browser.$1.path`\"\n+\ttest -z \"$browser_path\" && browser_path=\"$1\"\n+}\n+\n start_httpd\n url=http://127.0.0.1:$port\n-test -n \"$browser\" && \"$browser\" $url || echo $url\n+test -n \"$browser\" && {\n+\tinit_browser_path \"$browser\"\n+\t\"$browser_path\" $url\n+} || echo $url\n-- \n1.5.4.rc1.24.gf78d\n"},{"id":"66824","messageId":"20080129084618.GA15141@hand.yhbt.net","threadId":"11781","inReplyTo":"20080129070844.30781cd3.chriscool@tuxfamily.org","subject":"Re: [PATCH 3/3] instaweb: use 'browser.<tool>.path' config option if it's set.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-01-29T08:46:18Z","receivedAt":"2008-01-29T08:46:18Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Christian Couder <chriscool@tuxfamily.org> wrote:\n> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n\nThanks Christian,\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  Documentation/config.txt |    3 ++-\n>  git-instaweb.sh          |   10 +++++++++-\n>  2 files changed, 11 insertions(+), 2 deletions(-)\n> \n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 477b2d9..4e222f1 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -369,7 +369,8 @@ branch.<name>.rebase::\n>  \n>  browser.<tool>.path::\n>  \tOverride the path for the given tool that may be used to\n> -\tbrowse HTML help. See '-w' option in linkgit:git-help[1].\n> +\tbrowse HTML help (see '-w' option in linkgit:git-help[1]) or a\n> +\tworking repository in gitweb (see linkgit:git-instaweb[1]).\n>  \n>  clean.requireForce::\n>  \tA boolean to make git-clean do nothing unless given -f\n> diff --git a/git-instaweb.sh b/git-instaweb.sh\n> index ad0723c..3e4452b 100755\n> --- a/git-instaweb.sh\n> +++ b/git-instaweb.sh\n> @@ -274,6 +274,14 @@ webrick)\n>  \t;;\n>  esac\n>  \n> +init_browser_path() {\n> +\tbrowser_path=\"`git config browser.$1.path`\"\n> +\ttest -z \"$browser_path\" && browser_path=\"$1\"\n> +}\n> +\n>  start_httpd\n>  url=http://127.0.0.1:$port\n> -test -n \"$browser\" && \"$browser\" $url || echo $url\n> +test -n \"$browser\" && {\n> +\tinit_browser_path \"$browser\"\n> +\t\"$browser_path\" $url\n> +} || echo $url\n> -- \n> 1.5.4.rc1.24.gf78d\n"}]}