threads / patch / 17162

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

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

## tl;dr

3 messages between Jan 13, 2009 and Jan 14, 2009. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Craig Fratrik· Jan 13, 2009, 22:33 UTC · lore
---
 Documentation/git-commit.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to Documentation/git-commit.txt +2 −2
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ó· Jan 14, 2009, 09:55 UTC · re: Craig Fratrik · lore

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

* Craig Fratrik [Tue, 13 Jan 2009 14:33:36 -0800]:
Show 6 quoted 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).
> +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· Jan 14, 2009, 11:14 UTC · re: Adeodato Simó · lore

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

Adeodato Simó venit, vidit, dixit 14.01.2009 10:55:
Show 17 quoted lines
> * 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

← back to recent threads