diff options
author | Adam Roben <aroben@apple.com> | 2007-07-19 22:09:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-20 00:46:34 -0700 |
commit | ef0c2abf3e5061f891b7f07953ef3b0695f52c89 (patch) | |
tree | a48c4cbea302eb1d41bc1d798c1e85bcc892ea8a /Documentation | |
parent | Document how to tell git to not launch a pager (diff) | |
download | tgif-ef0c2abf3e5061f891b7f07953ef3b0695f52c89.tar.xz |
Add GIT_EDITOR environment and core.editor configuration variables
These variables let you specify an editor that will be launched in
preference to the EDITOR and VISUAL environment variables. The order
of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL.
[jc: added a test and config variable documentation]
Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 8 | ||||
-rw-r--r-- | Documentation/git-commit.txt | 10 | ||||
-rw-r--r-- | Documentation/git-send-email.txt | 4 |
3 files changed, 16 insertions, 6 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index d0e9a175f4..a850d55bf6 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -281,6 +281,14 @@ core.excludesfile:: of files which are not meant to be tracked. See gitlink:gitignore[5]. +core.editor:: + Commands such as `commit` and `tag` that lets you edit + messages by lauching an editor uses the value of this + variable when it is set, and the environment variable + `GIT_EDITOR` is not set. The order of preference is + `GIT_EDITOR` environment, `core.editor`, `EDITOR` and + `VISUAL` environment variables and then finally `vi`. + core.pager:: The command that git will use to paginate output. Can be overridden with the `GIT_PAGER` environment variable. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index f96142f96a..8e0e7e2d04 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -244,10 +244,12 @@ on the Subject: line and the rest of the commit in the body. include::i18n.txt[] -ENVIRONMENT VARIABLES ---------------------- -The command specified by either the VISUAL or EDITOR environment -variables is used to edit the commit log message. +ENVIRONMENT AND CONFIGURATION VARIABLES +--------------------------------------- +The editor used to edit the commit log message will be chosen from the +GIT_EDITOR environment variable, the core.editor configuration variable, the +VISUAL environment variable, or the EDITOR environment variable (in that +order). HOOKS ----- diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 293686c31f..d243ed1e3a 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -44,8 +44,8 @@ The --cc option must be repeated for each user you want on the cc list. value; if that is unspecified, default to --chain-reply-to. --compose:: - Use $EDITOR to edit an introductory message for the - patch series. + Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an + introductory message for the patch series. --from:: Specify the sender of the emails. This will default to |