Skip to content

Commit 36384c9

Browse files
MestreLiongitster
authored andcommitted
Documentation: improve description of GIT_EDITOR and preference order
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]>
1 parent d3f2475 commit 36384c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/git.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,12 @@ other
711711
a pager. See also the `core.pager` option in
712712
linkgit:git-config[1].
713713

714+
'GIT_EDITOR'::
715+
This environment variable overrides `$EDITOR` and `$VISUAL`.
716+
It is used by several git comands when, on interactive mode,
717+
an editor is to be launched. See also linkgit:git-var[1]
718+
and the `core.editor` option in linkgit:git-config[1].
719+
714720
'GIT_SSH'::
715721
If this environment variable is set then 'git fetch'
716722
and 'git push' will use this command instead

0 commit comments

Comments
 (0)