Skip to content

Commit

Permalink
Documentation: improve description of GIT_EDITOR and preference order
Browse files Browse the repository at this point in the history
Previously GIT_EDITOR was not listed in git(1) "Environment Variables" section,
which could be very confusing to users. Include it in "other" subsection along
with a link to git-var(1), since that is the page that fully describes all
places where editor can be set and also their preference order.

Also, git-var(1) did not say that hardcoded fallback 'vi' may have been changed
at build time. A user could be puzzled if 'nano' pops up even when none of the
mentioned environment vars or config.editor are set. Clarify this.

Ideally, the build system should be changed to reflect the chosen fallback
editor when creating the man pages. Not sure if that is even possible though.

Signed-off-by: Rodrigo Silva (MestreLion) <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
MestreLion authored and gitster committed Mar 26, 2012
1 parent d3f2475 commit 36384c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ other
a pager. See also the `core.pager` option in
linkgit:git-config[1].

'GIT_EDITOR'::
This environment variable overrides `$EDITOR` and `$VISUAL`.
It is used by several git comands when, on interactive mode,
an editor is to be launched. See also linkgit:git-var[1]
and the `core.editor` option in linkgit:git-config[1].

'GIT_SSH'::
If this environment variable is set then 'git fetch'
and 'git push' will use this command instead
Expand Down

0 comments on commit 36384c9

Please sign in to comment.