Re: [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rodrigo,

Rodrigo Silva (MestreLion) wrote:

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

Good catch.

Filling in the blank at compile time would be possible, but I'm not
convinced it's a good idea.  Wouldn't the same user be just as puzzled
when

  http://git.kernel.org/?p=git/git-htmldocs.git;a=blob_plain;f=git-var.html

(or whatever page with a nicer URL arises to replace the old
www.kernel.org/...  pages) says the fallback is 'vi' and git behaves
differently?

How about something like this?

Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
Context: http://bugs.debian.org/666250

 Documentation/git-var.txt |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git i/Documentation/git-var.txt w/Documentation/git-var.txt
index 5317cc24..beef9e28 100644
--- i/Documentation/git-var.txt
+++ w/Documentation/git-var.txt
@@ -43,13 +43,15 @@ GIT_EDITOR::
     `$SOME_ENVIRONMENT_VARIABLE`, `"C:\Program Files\Vim\gvim.exe"
     --nofork`.  The order of preference is the `$GIT_EDITOR`
     environment variable, then `core.editor` configuration, then
-    `$VISUAL`, then `$EDITOR`, and then finally 'vi'.
+    `$VISUAL`, then `$EDITOR`, and then the default chosen at compile
+    time, which is usually 'vi'.
 
 GIT_PAGER::
     Text viewer for use by git commands (e.g., 'less').  The value
     is meant to be interpreted by the shell.  The order of preference
     is the `$GIT_PAGER` environment variable, then `core.pager`
-    configuration, then `$PAGER`, and then finally 'less'.
+    configuration, then `$PAGER`, and then the default chosen at
+    compile time (usually 'less').
 
 Diagnostics
 -----------
-- 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]