From 482cce820554809c02bc639bb33462f9905e4342 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 2 Feb 2008 07:32:33 +0100 Subject: [PATCH 01/10] help: make 'git-help--browse' usable outside 'git-help'. "git-help--browse" helper is to launch a browser of the user's choice to view the HTML version of git documentation for a given command. It used to take the name of a command, convert it to the path of the documentation by prefixing the directory name and appending the ".html" suffix, and start the browser on the path. This updates the division of labor between the caller in help.c and git-help--browser helper. The helper is now responsible for launching a browser of the user's choice on given URLs, and it is the caller's responsibility to tell it the paths to documentation files. This is in preparation to reuse the logic to choose user's preferred browser in instaweb. The helper had a provision for running it without any command name, in which case it showed the toplevel "git(7)" documentation, but the caller in help.c never makes such a call. The helper now exits with a usage message when no path is given. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Makefile | 2 +- git-help--browse.sh | 24 +++++++++--------------- help.c | 18 +++++++++++++++++- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 92341c4bb..a03fd2e9c 100644 --- a/Makefile +++ b/Makefile @@ -819,6 +819,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) help.o: help.c common-cmds.h GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \ + '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ '-DGIT_MAN_PATH="$(mandir_SQ)"' \ '-DGIT_INFO_PATH="$(infodir_SQ)"' $< @@ -839,7 +840,6 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ - -e 's|@@HTMLDIR@@|$(htmldir_SQ)|g' \ $@.sh >$@+ && \ chmod +x $@+ && \ mv $@+ $@ diff --git a/git-help--browse.sh b/git-help--browse.sh index 10b0a36a3..88608bded 100755 --- a/git-help--browse.sh +++ b/git-help--browse.sh @@ -16,18 +16,13 @@ # git maintainer. # -USAGE='[--browser=browser|--tool=browser] [cmd to display] ...' +USAGE='[--browser=browser|--tool=browser] url/file ...' # This must be capable of running outside of git directory, so # the vanilla git-sh-setup should not be used. NONGIT_OK=Yes . git-sh-setup -# Install data. -html_dir="@@HTMLDIR@@" - -test -f "$html_dir/git.html" || die "No documentation directory found." - valid_tool() { case "$1" in firefox | iceweasel | konqueror | w3m | links | lynx | dillo) @@ -71,6 +66,8 @@ do shift done +test $# = 0 && usage + if test -z "$browser" then for opt in "help.browser" "web.browser" @@ -113,16 +110,13 @@ else fi fi -pages=$(for p in "$@"; do echo "$html_dir/$p.html" ; done) -test -z "$pages" && pages="$html_dir/git.html" - case "$browser" in firefox|iceweasel) # Check version because firefox < 2.0 does not support "-new-tab". vers=$(expr "$($browser_path -version)" : '.* \([0-9][0-9]*\)\..*') NEWTAB='-new-tab' test "$vers" -lt 2 && NEWTAB='' - nohup "$browser_path" $NEWTAB $pages & + nohup "$browser_path" $NEWTAB "$@" & ;; konqueror) case "$(basename "$browser_path")" in @@ -130,20 +124,20 @@ case "$browser" in # It's simpler to use kfmclient to open a new tab in konqueror. browser_path="$(echo "$browser_path" | sed -e 's/konqueror$/kfmclient/')" type "$browser_path" > /dev/null 2>&1 || die "No '$browser_path' found." - eval "$browser_path" newTab $pages + eval "$browser_path" newTab "$@" ;; kfmclient) - eval "$browser_path" newTab $pages + eval "$browser_path" newTab "$@" ;; *) - nohup "$browser_path" $pages & + nohup "$browser_path" "$@" & ;; esac ;; w3m|links|lynx) - eval "$browser_path" $pages + eval "$browser_path" "$@" ;; dillo) - nohup "$browser_path" $pages & + nohup "$browser_path" "$@" & ;; esac diff --git a/help.c b/help.c index 1302a61c8..b929899e6 100644 --- a/help.c +++ b/help.c @@ -328,10 +328,26 @@ static void show_info_page(const char *git_cmd) execlp("info", "info", "gitman", page, NULL); } +static void get_html_page_path(struct strbuf *page_path, const char *page) +{ + struct stat st; + + /* Check that we have a git documentation directory. */ + if (stat(GIT_HTML_PATH "/git.html", &st) || !S_ISREG(st.st_mode)) + die("'%s': not a documentation directory.", GIT_HTML_PATH); + + strbuf_init(page_path, 0); + strbuf_addf(page_path, GIT_HTML_PATH "/%s.html", page); +} + static void show_html_page(const char *git_cmd) { const char *page = cmd_to_page(git_cmd); - execl_git_cmd("help--browse", page, NULL); + struct strbuf page_path; /* it leaks but we exec bellow */ + + get_html_page_path(&page_path, page); + + execl_git_cmd("help--browse", page_path.buf, NULL); } void help_unknown_cmd(const char *cmd) From caa87713bca77c441c09282aa5b18b179bcfa90d Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 2 Feb 2008 07:32:41 +0100 Subject: [PATCH 02/10] help--browse: add '--config' option to check a config option for a browser. The value of this new command line option will be used as a key to check the configuration for an help browser. This should remove the last bit in 'git-help--browse' that was specific to 'git-help', so that other git command can use 'git-help--browse'. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- git-help--browse.sh | 23 ++++++++++++++++++----- help.c | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/git-help--browse.sh b/git-help--browse.sh index 88608bded..8ed489d88 100755 --- a/git-help--browse.sh +++ b/git-help--browse.sh @@ -16,7 +16,7 @@ # git maintainer. # -USAGE='[--browser=browser|--tool=browser] url/file ...' +USAGE='[--browser=browser|--tool=browser] [--config=conf.var] url/file ...' # This must be capable of running outside of git directory, so # the vanilla git-sh-setup should not be used. @@ -53,6 +53,18 @@ do shift ;; esac ;; + -c|--config*) + case "$#,$1" in + *,*=*) + conf=`expr "z$1" : 'z-[^=]*=\(.*\)'` + ;; + 1,*) + usage ;; + *) + conf="$2" + shift ;; + esac + ;; --) break ;; @@ -70,15 +82,16 @@ test $# = 0 && usage if test -z "$browser" then - for opt in "help.browser" "web.browser" + for opt in "$conf" "web.browser" do + test -z "$opt" && continue browser="`git config $opt`" test -z "$browser" || break done if test -n "$browser" && ! valid_tool "$browser"; then - echo >&2 "git config option $opt set to unknown browser: $browser" - echo >&2 "Resetting to default..." - unset browser + echo >&2 "git config option $opt set to unknown browser: $browser" + echo >&2 "Resetting to default..." + unset browser fi fi diff --git a/help.c b/help.c index b929899e6..058a39753 100644 --- a/help.c +++ b/help.c @@ -347,7 +347,7 @@ static void show_html_page(const char *git_cmd) get_html_page_path(&page_path, page); - execl_git_cmd("help--browse", page_path.buf, NULL); + execl_git_cmd("help--browse", "-c", "help.browser", page_path.buf, NULL); } void help_unknown_cmd(const char *cmd) From 5884f1fe96b33d9666a78e660042b1e3e5f9f4d9 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 2 Feb 2008 07:32:53 +0100 Subject: [PATCH 03/10] Rename 'git-help--browse.sh' to 'git-web--browse.sh'. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-help.txt | 6 +++--- Makefile | 2 +- git-help--browse.sh => git-web--browse.sh | 0 help.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename git-help--browse.sh => git-web--browse.sh (100%) diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index fb77ca3a5..ad41aabeb 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -47,19 +47,19 @@ OPTIONS + The web browser can be specified using the configuration variable 'help.browser', or 'web.browser' if the former is not set. If none of -these config variables is set, the 'git-help--browse' helper script +these config variables is set, the 'git-web--browse' helper script (called by 'git-help') will pick a suitable default. + You can explicitly provide a full path to your preferred browser by setting the configuration variable 'browser..path'. For example, you can configure the absolute path to firefox by setting -'browser.firefox.path'. Otherwise, 'git-help--browse' assumes the tool +'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool is available in PATH. + Note that the script tries, as much as possible, to display the HTML page in a new tab on an already opened browser. + -The following browsers are currently supported by 'git-help--browse': +The following browsers are currently supported by 'git-web--browse': + * firefox (this is the default under X Window when not using KDE) * iceweasel diff --git a/Makefile b/Makefile index a03fd2e9c..d288378aa 100644 --- a/Makefile +++ b/Makefile @@ -231,7 +231,7 @@ SCRIPT_SH = \ git-lost-found.sh git-quiltimport.sh git-submodule.sh \ git-filter-branch.sh \ git-stash.sh \ - git-help--browse.sh + git-web--browse.sh SCRIPT_PERL = \ git-add--interactive.perl \ diff --git a/git-help--browse.sh b/git-web--browse.sh similarity index 100% rename from git-help--browse.sh rename to git-web--browse.sh diff --git a/help.c b/help.c index 058a39753..c35912bc5 100644 --- a/help.c +++ b/help.c @@ -347,7 +347,7 @@ static void show_html_page(const char *git_cmd) get_html_page_path(&page_path, page); - execl_git_cmd("help--browse", "-c", "help.browser", page_path.buf, NULL); + execl_git_cmd("web--browse", "-c", "help.browser", page_path.buf, NULL); } void help_unknown_cmd(const char *cmd) From 2e0c290299e381884e4f4a4efb847fc8ecc4647c Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 2 Feb 2008 07:32:56 +0100 Subject: [PATCH 04/10] instaweb: use 'git-web--browse' to launch browser. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- git-instaweb.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/git-instaweb.sh b/git-instaweb.sh index 3e4452bc4..6f91c8f84 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -24,8 +24,6 @@ restart restart the web server fqgitdir="$GIT_DIR" local="`git config --bool --get instaweb.local`" httpd="`git config --get instaweb.httpd`" -browser="`git config --get instaweb.browser`" -test -z "$browser" && browser="`git config --get web.browser`" port=`git config --get instaweb.port` module_path="`git config --get instaweb.modulepath`" @@ -36,9 +34,6 @@ conf="$GIT_DIR/gitweb/httpd.conf" # if installed, it doesn't need further configuration (module_path) test -z "$httpd" && httpd='lighttpd -f' -# probably the most popular browser among gitweb users -test -z "$browser" && browser='firefox' - # any untaken local port will do... test -z "$port" && port=1234 @@ -274,14 +269,11 @@ webrick) ;; esac -init_browser_path() { - browser_path="`git config browser.$1.path`" - test -z "$browser_path" && browser_path="$1" -} - start_httpd url=http://127.0.0.1:$port -test -n "$browser" && { - init_browser_path "$browser" - "$browser_path" $url -} || echo $url + +if test -n "$browser"; then + git web--browse -b "$browser" $url || echo $url +else + git web--browse -c "instaweb.browser" $url || echo $url +fi From a0685a4f45ac8916212188032f75d4acb4031089 Mon Sep 17 00:00:00 2001 From: Dmitry Potapov Date: Sat, 9 Feb 2008 23:22:22 -0800 Subject: [PATCH 05/10] git-web--browse: do not start the browser with nohup There is no good reason to run GUI browsers using "nohup". It does not solve any real problem but creates annoying "nohup.out" files in every directory where git help -w is run. Signed-off-by: Dmitry Potapov Signed-off-by: Junio C Hamano --- git-web--browse.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-web--browse.sh b/git-web--browse.sh index 8ed489d88..2c51f361d 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -129,7 +129,7 @@ case "$browser" in vers=$(expr "$($browser_path -version)" : '.* \([0-9][0-9]*\)\..*') NEWTAB='-new-tab' test "$vers" -lt 2 && NEWTAB='' - nohup "$browser_path" $NEWTAB "$@" & + "$browser_path" $NEWTAB "$@" & ;; konqueror) case "$(basename "$browser_path")" in @@ -143,7 +143,7 @@ case "$browser" in eval "$browser_path" newTab "$@" ;; *) - nohup "$browser_path" "$@" & + "$browser_path" "$@" & ;; esac ;; @@ -151,6 +151,6 @@ case "$browser" in eval "$browser_path" "$@" ;; dillo) - nohup "$browser_path" "$@" & + "$browser_path" "$@" & ;; esac From 897d39ced4a670dd46df489b25561926dfb011dc Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 8 Feb 2008 13:33:51 +0000 Subject: [PATCH 06/10] Adjust .gitignore for 5884f1(Rename 'git-help--browse.sh'...) Since git-help--browse was renamed, we should ignore git-web--browse instead. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7f8421dcd..165b256e2 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,6 @@ git-gc git-get-tar-commit-id git-grep git-hash-object -git-help--browse git-http-fetch git-http-push git-imap-send @@ -136,6 +135,7 @@ git-upload-pack git-var git-verify-pack git-verify-tag +git-web--browse git-whatchanged git-write-tree git-core-*/?* From b261ec463a4c117aa7961fd3667ffafe0f9ee986 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 9 Feb 2008 07:10:57 +0100 Subject: [PATCH 07/10] Documentation: instaweb: add 'git-web--browse' information. Now that 'git-instaweb' uses 'git-web--browse', update the documentation accordingly. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-instaweb.txt | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt index 841e8fac7..a1456abeb 100644 --- a/Documentation/git-instaweb.txt +++ b/Documentation/git-instaweb.txt @@ -38,10 +38,23 @@ OPTIONS The port number to bind the httpd to. (Default: 1234) -b|--browser:: - - The web browser command-line to execute to view the gitweb page. - If blank, the URL of the gitweb instance will be printed to - stdout. (Default: 'firefox') + The web browser that should be used to view the gitweb + page. This will be passed to the 'git-web--browse' helper + script along with the URL of the gitweb instance. If the + script fails, the URL will be printed to stdout. ++ +Note that the 'git-web--browse' script tries, as much as possible, to +display the HTML page in a new tab on an already opened browser. ++ +The following browsers are currently supported by 'git-web--browse': ++ +* firefox (this is the default under X Window when not using KDE) +* iceweasel +* konqueror (this is the default under KDE) +* w3m (this is the default outside X Window) +* links +* lynx +* dillo --start:: Start the httpd instance and exit. This does not generate @@ -74,6 +87,12 @@ You may specify configuration in your .git/config If the configuration variable 'instaweb.browser' is not set, 'web.browser' will be used instead if it is defined. +You can explicitly provide a full path to your preferred browser by +setting the configuration variable 'browser..path'. For example, +you can configure the absolute path to firefox by setting +'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool +is available in PATH. + Author ------ Written by Eric Wong From 193ad4f63c511948050079ddbe8c9b7342bf85a4 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 9 Feb 2008 07:11:01 +0100 Subject: [PATCH 08/10] web--browse: Add a few quotes in 'init_browser_path'. These changes were made to the 'init_browser_path' function in 'git-instaweb.sh', but was not in 'git-web--browse.sh'. [jc: the quoting was screwy and did not quote $1 correctly, so I fixed it up.] Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- git-web--browse.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-web--browse.sh b/git-web--browse.sh index 2c51f361d..3ade500e0 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -34,8 +34,8 @@ valid_tool() { } init_browser_path() { - browser_path=`git config browser.$1.path` - test -z "$browser_path" && browser_path=$1 + browser_path=$(git "config browser.$1.path") + test -z "$browser_path" && browser_path="$1" } while test $# != 0 From 8e08689959a78bb4f27e010fbd225b4bf3addadb Mon Sep 17 00:00:00 2001 From: "jaysoffian+git@gmail.com" Date: Mon, 11 Feb 2008 10:57:34 -0500 Subject: [PATCH 09/10] git-web--browse: fix misplaced quote in init_browser_path() git "config browser.$1.path" should be git config "browser.$1.path" Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- git-web--browse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-web--browse.sh b/git-web--browse.sh index 3ade500e0..fbf29cbe1 100755 --- a/git-web--browse.sh +++ b/git-web--browse.sh @@ -34,7 +34,7 @@ valid_tool() { } init_browser_path() { - browser_path=$(git "config browser.$1.path") + browser_path=$(git config "browser.$1.path") test -z "$browser_path" && browser_path="$1" } From cb45f83cbdfcde4333ea5982b3c763e136fc599c Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Thu, 14 Feb 2008 08:01:23 +0100 Subject: [PATCH 10/10] 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 Signed-off-by: Junio C Hamano --- Documentation/git-help.txt | 24 ++-------- Documentation/git-instaweb.txt | 27 ++--------- Documentation/git-web--browse.txt | 78 +++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 43 deletions(-) create mode 100644 Documentation/git-web--browse.txt diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index ad41aabeb..0926dc12b 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -48,26 +48,8 @@ OPTIONS The web browser can be specified using the configuration variable 'help.browser', or 'web.browser' if the former is not set. If none of these config variables is set, the 'git-web--browse' helper script -(called by 'git-help') will pick a suitable default. -+ -You can explicitly provide a full path to your preferred browser by -setting the configuration variable 'browser..path'. For example, -you can configure the absolute path to firefox by setting -'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool -is available in PATH. -+ -Note that the script tries, as much as possible, to display the HTML -page in a new tab on an already opened browser. -+ -The following browsers are currently supported by 'git-web--browse': -+ -* firefox (this is the default under X Window when not using KDE) -* iceweasel -* konqueror (this is the default under KDE) -* w3m (this is the default outside X Window) -* links -* lynx -* dillo +(called by 'git-help') will pick a suitable default. See +linkgit:git-web--browse[1] for more information about this. CONFIGURATION VARIABLES ----------------------- @@ -84,7 +66,7 @@ line option: The 'help.browser', 'web.browser' and 'browser..path' will also be checked if the 'web' format is chosen (either by command line option or configuration variable). See '-w|--web' in the OPTIONS -section above. +section above and linkgit:git-web--browse[1]. Note that these configuration variables should probably be set using the '--global' flag, for example like this: diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt index a1456abeb..51f1532ef 100644 --- a/Documentation/git-instaweb.txt +++ b/Documentation/git-instaweb.txt @@ -40,21 +40,9 @@ OPTIONS -b|--browser:: The web browser that should be used to view the gitweb page. This will be passed to the 'git-web--browse' helper - script along with the URL of the gitweb instance. If the - script fails, the URL will be printed to stdout. -+ -Note that the 'git-web--browse' script tries, as much as possible, to -display the HTML page in a new tab on an already opened browser. -+ -The following browsers are currently supported by 'git-web--browse': -+ -* firefox (this is the default under X Window when not using KDE) -* iceweasel -* konqueror (this is the default under KDE) -* w3m (this is the default outside X Window) -* links -* lynx -* dillo + script along with the URL of the gitweb instance. See + linkgit:git-web--browse[1] for more information about this. If + the script fails, the URL will be printed to stdout. --start:: Start the httpd instance and exit. This does not generate @@ -85,13 +73,8 @@ You may specify configuration in your .git/config ----------------------------------------------------------------------- If the configuration variable 'instaweb.browser' is not set, -'web.browser' will be used instead if it is defined. - -You can explicitly provide a full path to your preferred browser by -setting the configuration variable 'browser..path'. For example, -you can configure the absolute path to firefox by setting -'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool -is available in PATH. +'web.browser' will be used instead if it is defined. See +linkgit:git-web--browse[1] for more information about this. Author ------ diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt new file mode 100644 index 000000000..df57d010e --- /dev/null +++ b/Documentation/git-web--browse.txt @@ -0,0 +1,78 @@ +git-web--browse(1) +================== + +NAME +---- +git-web--browse - git helper script to launch a web browser + +SYNOPSIS +-------- +'git-web--browse' [OPTIONS] URL/FILE ... + +DESCRIPTION +----------- + +This script tries, as much as possible, to display the URLs and FILEs +that are passed as arguments, as HTML pages in new tabs on an already +opened web browser. + +The following browsers (or commands) are currently supported: + +* firefox (this is the default under X Window when not using KDE) +* iceweasel +* konqueror (this is the default under KDE) +* w3m (this is the default outside graphical environments) +* links +* lynx +* dillo +* open (this is the default under Mac OS X GUI) + +OPTIONS +------- +-b BROWSER|--browser=BROWSER:: + Use the specified BROWSER. It must be in the list of supported + browsers. + +-t BROWSER|--tool=BROWSER:: + Same as above. + +-c CONF.VAR|--config=CONF.VAR:: + CONF.VAR is looked up in the git config files. If it's set, + then its value specify the browser that should be used. + +CONFIGURATION VARIABLES +----------------------- + +The web browser can be specified using a configuration variable passed +with the -c (or --config) command line option, or the 'web.browser' +configuration variable if the former is not used. + +You can explicitly provide a full path to your preferred browser by +setting the configuration variable 'browser..path'. For example, +you can configure the absolute path to firefox by setting +'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool +is available in PATH. + +Note that these configuration variables should probably be set using +the '--global' flag, for example like this: + +------------------------------------------------ +$ git config --global web.browser firefox +------------------------------------------------ + +as they are probably more user specific than repository specific. +See linkgit:git-config[1] for more information about this. + +Author +------ +Written by Christian Couder and the git-list +, based on git-mergetool by Theodore Y. Ts'o. + +Documentation +------------- +Documentation by Christian Couder and the +git-list . + +GIT +--- +Part of the linkgit:git[7] suite