summaryrefslogtreecommitdiff
path: root/git-browse-help.sh
AgeCommit message (Collapse)Author
2007-12-13git-help -w: do not require to be in git repositoryJunio C Hamano
The users used to be able to say "git help cat-file" from anywhere, but the browse-help script insisted to be in a git repository, which caused "git help -w cat-file" to barf outside. Correct it. While at it, remove leftover debugging "echo". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09Use {web,instaweb,help}.browser config options.Christian Couder
Now "git-instaweb" will try to use the browser configured as "web.browser", if "instaweb.browser" is not set. "git-browse-help" will check first "help.browser" and then "web.browser". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09git-help: add -w|--web option to display html man page in a browser.Christian Couder
Now when using "git help -w cmd", we will try to show the HTML man page "git-cmd.html" in your prefered web browser. To do that "help.c" code will call a new shell script "git-browse-help". This currently works only if the HTML versions of the man page have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"), so new target to do that is added to "Documentation/Makefile". The browser to use can be configured using the "web.browser" config variable. We try to open a new tab in an existing web browser, if possible. The code in "git-browse-help" is heavily stolen from "git-mergetool" by Theodore Y. Ts'o. Thanks. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>