Git: Feature request: clarify default editor option

Created on 10 Oct 2018  路  7Comments  路  Source: git-for-windows/git

  • [x] I was not able to find an open or closed issue matching what I'm seeing

Summary

One of the first choices that needs to be made when using the Git for Windows installer concerns Git's default editor:
image

The option shown in the screenshot ("Use Vim...") results in exactly the behaviour that I would like: it leaves the core.editor option unset, causing Git to fall back the EDITOR env variable, as described here. But from the description, I had assumed that it would set core.editor=vim, so for months (or years!? however long the option to pick an editor has been in the installer...) I've been choosing nano and clearing the option by hand after installation.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.19.1.windows.1
cpu: x86_64
built from commit: 11a3092e18f2201acd53e45aaa006f1601b6c02a
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 10.0.17134.285]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Editor Option: VIM
Custom Editor Path:
Path Option: CmdTools
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Enable Builtin Rebase: Disabled
Enable Builtin Stash: Enabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash / MinTTY

up for grabs

Most helpful comment

@aakriti-jain I haven't started any work. If you want to take this up, it would be much appreciated!

All 7 comments

So, if I understand correctly, you feel that there are effectively two potential options hiding under the one selection:

  1. the core.editor option unset, causing Git to fall back the EDITOR env variable
  2. the core.editor=vim is set (no fall back to the EDITOR env variable).

Which would either mean:

  • (A) creating two options for the option screens
    or
  • (B) updating the screen text to better explain/clarify the underlying actions for those that do appreciate what it means.

Doing the second B option may be easier (saying "this will leave the core.editor option unset, causing Git to fall back the EDITOR env variable...").

If you have the time, the instructions begin here https://github.com/git-for-windows/git/wiki/Building-Git so as to update the install screen within the Build-extra part of the install process.

If you have the time, the instructions begin here https://github.com/git-for-windows/git/wiki/Building-Git so as to update the install screen within the Build-extra part of the install process.

Actually, Git does not even have to be built. Instead,

  1. install the Git for Windows SDK (https://gitforwindows.org/#download-sdk),
  2. build an installer (to verify it works): sdk build git-and-installer
  3. edit /usr/src/build-extra/installer/install.iss according to your wishes
  4. again build an installer with sdk build git-and-installer
  5. test it
  6. if necessary, repeat from step 4
  7. sdk cd build-extra
  8. commit, push and open a PR

Hello @dscho @PhilipOakley ! I want to get started with Git Development. Can I take up this issue?

@aakriti-jain You are always welcome. Please also coordinate with @zwilliams to avoid accidental clashes of duplicated work (this reference to his username should help confirm if he had already started...).

Even if there is a little duplication, it will be good practice and the best of both can be merged.

@aakriti-jain I haven't started any work. If you want to take this up, it would be much appreciated!

Okay @zwilliams @PhilipOakley . I am going to work on it now. You may expect a PR in a day or two.

@aakriti-jain We look forward to your contributions. Many thanks for the offer, and don't worry if it takes slightly longer than you expect. Life often gets in the way.... and the project will still be here...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yegorich picture yegorich  路  3Comments

vocaviking picture vocaviking  路  5Comments

jesterKing picture jesterKing  路  3Comments

sschlesier picture sschlesier  路  3Comments

michaelblyons picture michaelblyons  路  5Comments