Skip to content

Commit cb45f83

Browse files
chriscoolgitster
authored andcommitted
Documentation: add 'git-web--browse.txt' and simplify other docs.
'git-help.txt' and 'git-instaweb.txt' contained duplicated information about 'git-web--browse'. This patch puts this information where it belongs. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8e08689 commit cb45f83

File tree

3 files changed

+86
-43
lines changed

3 files changed

+86
-43
lines changed

Documentation/git-help.txt

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,8 @@ OPTIONS
4848
The web browser can be specified using the configuration variable
4949
'help.browser', or 'web.browser' if the former is not set. If none of
5050
these config variables is set, the 'git-web--browse' helper script
51-
(called by 'git-help') will pick a suitable default.
52-
+
53-
You can explicitly provide a full path to your preferred browser by
54-
setting the configuration variable 'browser.<tool>.path'. For example,
55-
you can configure the absolute path to firefox by setting
56-
'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
57-
is available in PATH.
58-
+
59-
Note that the script tries, as much as possible, to display the HTML
60-
page in a new tab on an already opened browser.
61-
+
62-
The following browsers are currently supported by 'git-web--browse':
63-
+
64-
* firefox (this is the default under X Window when not using KDE)
65-
* iceweasel
66-
* konqueror (this is the default under KDE)
67-
* w3m (this is the default outside X Window)
68-
* links
69-
* lynx
70-
* dillo
51+
(called by 'git-help') will pick a suitable default. See
52+
linkgit:git-web--browse[1] for more information about this.
7153

7254
CONFIGURATION VARIABLES
7355
-----------------------
@@ -84,7 +66,7 @@ line option:
8466
The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
8567
be checked if the 'web' format is chosen (either by command line
8668
option or configuration variable). See '-w|--web' in the OPTIONS
87-
section above.
69+
section above and linkgit:git-web--browse[1].
8870

8971
Note that these configuration variables should probably be set using
9072
the '--global' flag, for example like this:

Documentation/git-instaweb.txt

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,9 @@ OPTIONS
4040
-b|--browser::
4141
The web browser that should be used to view the gitweb
4242
page. This will be passed to the 'git-web--browse' helper
43-
script along with the URL of the gitweb instance. If the
44-
script fails, the URL will be printed to stdout.
45-
+
46-
Note that the 'git-web--browse' script tries, as much as possible, to
47-
display the HTML page in a new tab on an already opened browser.
48-
+
49-
The following browsers are currently supported by 'git-web--browse':
50-
+
51-
* firefox (this is the default under X Window when not using KDE)
52-
* iceweasel
53-
* konqueror (this is the default under KDE)
54-
* w3m (this is the default outside X Window)
55-
* links
56-
* lynx
57-
* dillo
43+
script along with the URL of the gitweb instance. See
44+
linkgit:git-web--browse[1] for more information about this. If
45+
the script fails, the URL will be printed to stdout.
5846

5947
--start::
6048
Start the httpd instance and exit. This does not generate
@@ -85,13 +73,8 @@ You may specify configuration in your .git/config
8573
-----------------------------------------------------------------------
8674

8775
If the configuration variable 'instaweb.browser' is not set,
88-
'web.browser' will be used instead if it is defined.
89-
90-
You can explicitly provide a full path to your preferred browser by
91-
setting the configuration variable 'browser.<tool>.path'. For example,
92-
you can configure the absolute path to firefox by setting
93-
'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
94-
is available in PATH.
76+
'web.browser' will be used instead if it is defined. See
77+
linkgit:git-web--browse[1] for more information about this.
9578

9679
Author
9780
------

Documentation/git-web--browse.txt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
git-web--browse(1)
2+
==================
3+
4+
NAME
5+
----
6+
git-web--browse - git helper script to launch a web browser
7+
8+
SYNOPSIS
9+
--------
10+
'git-web--browse' [OPTIONS] URL/FILE ...
11+
12+
DESCRIPTION
13+
-----------
14+
15+
This script tries, as much as possible, to display the URLs and FILEs
16+
that are passed as arguments, as HTML pages in new tabs on an already
17+
opened web browser.
18+
19+
The following browsers (or commands) are currently supported:
20+
21+
* firefox (this is the default under X Window when not using KDE)
22+
* iceweasel
23+
* konqueror (this is the default under KDE)
24+
* w3m (this is the default outside graphical environments)
25+
* links
26+
* lynx
27+
* dillo
28+
* open (this is the default under Mac OS X GUI)
29+
30+
OPTIONS
31+
-------
32+
-b BROWSER|--browser=BROWSER::
33+
Use the specified BROWSER. It must be in the list of supported
34+
browsers.
35+
36+
-t BROWSER|--tool=BROWSER::
37+
Same as above.
38+
39+
-c CONF.VAR|--config=CONF.VAR::
40+
CONF.VAR is looked up in the git config files. If it's set,
41+
then its value specify the browser that should be used.
42+
43+
CONFIGURATION VARIABLES
44+
-----------------------
45+
46+
The web browser can be specified using a configuration variable passed
47+
with the -c (or --config) command line option, or the 'web.browser'
48+
configuration variable if the former is not used.
49+
50+
You can explicitly provide a full path to your preferred browser by
51+
setting the configuration variable 'browser.<tool>.path'. For example,
52+
you can configure the absolute path to firefox by setting
53+
'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
54+
is available in PATH.
55+
56+
Note that these configuration variables should probably be set using
57+
the '--global' flag, for example like this:
58+
59+
------------------------------------------------
60+
$ git config --global web.browser firefox
61+
------------------------------------------------
62+
63+
as they are probably more user specific than repository specific.
64+
See linkgit:git-config[1] for more information about this.
65+
66+
Author
67+
------
68+
Written by Christian Couder <chriscool@tuxfamily.org> and the git-list
69+
<git@vger.kernel.org>, based on git-mergetool by Theodore Y. Ts'o.
70+
71+
Documentation
72+
-------------
73+
Documentation by Christian Couder <chriscool@tuxfamily.org> and the
74+
git-list <git@vger.kernel.org>.
75+
76+
GIT
77+
---
78+
Part of the linkgit:git[7] suite

0 commit comments

Comments
 (0)