# [PATCH] Noted that vi is the final choice of editor in git help commit

3 messages from 2009-01-13 to 2009-01-14. Participants: Craig Fratrik, Adeodato Simó, Michael J Gruber.
Thread: https://gitlist.dev/t/17162

## Craig Fratrik, 2009-01-13 22:33

Subject: [PATCH] Noted that vi is the final choice of editor in git help commit
Message-ID: <1231886016-31675-1-git-send-email-cfratrik@gmail.com>
URL: https://gitlist.dev/e/1231886016-31675-1-git-send-email-cfratrik%40gmail.com

```
---
 Documentation/git-commit.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index b5d81be..1b9e7a5 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -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
 -----
-- 
1.6.0.4.608.ga9645.dirty

```

## Adeodato Simó, 2009-01-14 09:55

Subject: Re: [PATCH] Noted that vi is the final choice of editor in git help commit
Message-ID: <20090114095512.GA29927@chistera.yi.org>
URL: https://gitlist.dev/e/20090114095512.GA29927%40chistera.yi.org
In-Reply-To: <1231886016-31675-1-git-send-email-cfratrik@gmail.com>

```
* Craig Fratrik [Tue, 13 Jan 2009 14:33:36 -0800]:

>  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).

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.

-- 
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

```

## Michael J Gruber, 2009-01-14 11:14

Subject: Re: [PATCH] Noted that vi is the final choice of editor in git help commit
Message-ID: <496DC912.1070908@drmicha.warpmail.net>
URL: https://gitlist.dev/e/496DC912.1070908%40drmicha.warpmail.net
In-Reply-To: <20090114095512.GA29927@chistera.yi.org>

```
Adeodato Simó venit, vidit, dixit 14.01.2009 10:55:
> * Craig Fratrik [Tue, 13 Jan 2009 14:33:36 -0800]:
> 
>>  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).
> 
> 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.
> 

+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

```
