Skip to contentSkip to conversation

Noted that vi is the final choice of editor in git help commit

PATCH In review Craig Fratrik 3 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Noted that vi is the final choice of editor in git help commit

---
 Documentation/git-commit.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/git-commit.txt +2 -2
index b5d81be..1b9e7a5 100644
@@ -318,8 +318,8 @@ 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).
+VISUAL environment variable, the EDITOR environment variable, or finally 'vi'
+(in that order).
 
 HOOKS
 -----
Signature · 1 line
1.6.0.4.608.ga9645.dirty
#1 lore raw

Documentation/git-commit.txt ENVIRONMENT AND CONFIGURATION VARIABLES · line 322

Quoted 6 lines · Craig Fratrik

The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the

Documentation/git-commit.txt +2 -2
-VISUAL environment variable, or the EDITOR environment variable (in that
-order).
+VISUAL environment variable, the EDITOR environment variable, or finally 'vi'
+(in that order).

May I suggest:

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).
+order). If none of those are set, "vi" will be used.

Signature · 5 lines
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
A lie can go round the world before the truth has got its boots on.
                -- Terry Pratchett
#2 lore raw

Adeodato Simó venit, vidit, dixit 14.01.2009 10:55:

Quoted 11 lines · Craig Fratrik

Documentation/git-commit.txt ENVIRONMENT AND CONFIGURATION VARIABLES · line 322

Quoted 7 lines

The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the

Documentation/git-commit.txt +2 -2
-VISUAL environment variable, or the EDITOR environment variable (in that
-order).
+VISUAL environment variable, the EDITOR environment variable, or finally 'vi'
+(in that order).

May I suggest:

Quoted 6 lines

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).
+order). If none of those are set, "vi" will be used.

+order). If none of those are set, "vi" will be used unless TERM is +unset or set to "dumb".

There is also some special parsing of the value but I don't think it needs to be advertised. The terminal-less case, on the other hand, may be relevant for scripters and ssh'ers.

Cheers,
Michael