git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Rodrigo Silva <linux@rodrigosilva.com>
Date
Mar 30, 2012, 10:33 UTC
Message-ID
<BuLHbqo4rrB.A.lMC.A5YdPB@liszt>
In-Reply-To
<7v398qq1ei.fsf@alter.siamese.dyndns.org>
At 23:16 29/3/2012, Junio C Hamano wrote:
Show 16 quoted lines
>Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> 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?
>
>I've already rejected this patch once, but that was primarily because the
>patch was not justified with the above "I read everybody else's git uses
>'vi' on the Interweb, and even though my distro's manual page says it uses
>'nano', I didn't bother to read it." scenario.
@Jonathan: I'm really sorry for this confusion... I forgot to mention this issue WAS taken to upstream already, and it was rejected because build-time options should be documented by whoever did the changes. So in this case, it's Debian's task to update their man pags to reflect their build-time changes. Junio suggested me to send this patch to Debian, that's why I filled the bug in Debian BTS. It was meant to be a Debian-only patch.
So upstream git man would still say "... and finally 'vi'", since this is upstream default, and Debian would read "... and finally 'editor'", since this is the default set by Debian at build-time. For reference, the original patch included this change, among others:
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index 5317cc2..9c49163 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -43,7 +43,8 @@ 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 finally a hardcoded fallback
+    editor set at build time, by default 'vi'.
 
 GIT_PAGER::
     Text viewer for use by git commands (e.g., 'less').  The value

The other changes were fully accepted upstream, this one was rejected. So I modified it to Debian's scenario and filled the bug in BTS.

Since this is meant for Debian, no need to be generic about the "fallback editor set at build time": Debian uses 'editor', so 'editor' should be explicitly mentioned to correctly reflect git's behavior on a Debian system.

@Junio, I'm really sorry for indirectly bringing this up twice to your attention. I've never expected Debian maitainers to be so resposinve, it was awesome fast by reading, analysing and forwarding upstream in a matter of hours. I'm impressed (and embarasssed by this confusion)

MestreLion
Previous: Junio C HamanoNext: Jonathan Nieder
Message 3 of 11 in “Re: [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time option”
  1. Jonathan NiederMar 30, 2012
  2. Junio C HamanoMar 30, 2012
  3. Bug#666250: [PATCH] Documentation: replace 'vi' for 'editor' to reflect build-time optionRodrigo Silva, Mar 30, 2012
  4. 0/2 Re: Documentation: replace 'vi' for 'editor' to reflect build-time optionJonathan Nieder, Mar 31, 2012
  5. 1/2 var doc: default editor and pager are configurable at build timeJonathan Nieder, Mar 31, 2012
  6. 2/2 var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settingsJonathan Nieder, Mar 31, 2012
  7. Junio C HamanoMar 31, 2012
  8. Jonathan NiederApr 18, 2012
  9. Phil HordMar 31, 2012
  10. Junio C HamanoMar 30, 2012
  11. Jonathan NiederMar 31, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.