summaryrefslogtreecommitdiff
path: root/git-browse-help.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2007-12-15 05:57:28 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-14 21:58:35 -0800
commit70087cdbd3671f5929689a9b77f414b8297641c2 (patch)
tree4c49563792e479574b67fdde3a8e2e07772d7c77 /git-browse-help.sh
parentdfaf75b4698833d820e77e9f42ef93f3b6d3669d (diff)
downloadgit-70087cdbd3671f5929689a9b77f414b8297641c2.tar.gz
git-help: add "help.format" config variable.
This config variable makes it possible to choose the default format used to display help. This format will be used only if no option like -a|--all|-i|--info|-m|--man|-w|--web is passed to "git-help". The following values are possible for this variable: - "man" --> "man" program is used - "info" --> "info" program is used - "web" --> "git-browse-help" is used By default we still show help using "man". This patch also adds -m|--man command line option to use "man" to allow overriding the "help.format" configuration variable. Note that this patch also revert some recent changes in "git-browse-help" because they prevented to look for config variables in the global configuration file. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-browse-help.sh')
-rwxr-xr-xgit-browse-help.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-browse-help.sh b/git-browse-help.sh
index b465911c9a..10b0a36a3d 100755
--- a/git-browse-help.sh
+++ b/git-browse-help.sh
@@ -39,7 +39,7 @@ valid_tool() {
}
init_browser_path() {
- test -z "$GIT_DIR" || browser_path=`git config browser.$1.path`
+ browser_path=`git config browser.$1.path`
test -z "$browser_path" && browser_path=$1
}
@@ -71,7 +71,7 @@ do
shift
done
-if test -z "$browser" && test -n "$GIT_DIR"
+if test -z "$browser"
then
for opt in "help.browser" "web.browser"
do