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

Re: [PATCH 2/2] instaweb: use 'browser.<tool>.path' config option if it's set.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 28, 2008, 07:38 UTC
Message-ID
<7vtzkyv1pv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080128080225.583dbac8.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 30 quoted lines
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
>  Documentation/config.txt |    3 ++-
>  git-instaweb.sh          |   10 +++++++++-
>  2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index c2fedd1..584250c 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -369,7 +369,8 @@ branch.<name>.rebase::
>  
>  browser.<tool>.path::
>  	Override the path for the given tool that may be used to
> -	browse help. See linkgit:git-help[1].
> +	browse help (see linkgit:git-help[1]) or a working repository
> +	in gitweb (see linkgit:git-instaweb[1]).
>  
>  clean.requireForce::
>  	A boolean to make git-clean do nothing unless given -f
> diff --git a/git-instaweb.sh b/git-instaweb.sh
> index ad0723c..b21a0a5 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`
Needquote?
Show 12 quoted lines
> +	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
> -- 
> 1.5.4.rc4.16.g1009
Previous: Christian Couder
Message 2 of 2 in “instaweb: use 'browser.<tool>.path' config option if it's set.”
  1. 2/2 instaweb: use 'browser.<tool>.path' config option if it's set.Christian Couder, Jan 28, 2008
  2. Junio C HamanoJan 28, 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.