please.sh build-mingw-w64-git: configure the editor explicitly#685
Merged
please.sh build-mingw-w64-git: configure the editor explicitly#685
Conversation
For historical reasons, Git configures `vi` as the default editor, and the Git for Windows project followed suite. As part of collaborating more closely with MSYS2, the `mingw-w64-git` package definition of Git for Windows is being synchronized between both projects. And MSYS2 has a different default editor, also for historical reasons: `nano`. As a consequence, https://github.com/msys/MINGW-packages/aae0c9d1c8 (git: default to nano instead of vim (#28202), 2026-03-01) changed the package definition to build with `nano` as Git's default editor. This hard-coded value would have prevented Git for Windows to maintain _its_ default, and for that reason, the MSYS2 project added another commit, https://github.com/msys/MINGW-packages/d3ff7a1ec7 (git: allow _DEFAULT_EDITOR override, 2026-03-11), to allow Git for Windows to override that default. This is what we do here: override the default, by setting `_DEFAULT_EDITOR` to `vim`. Technically, this is a slight deviation from the previous default, which was `vi`. But the package definition uses this variable for two things: to tell Git's build process what the default editor is, and to add the corresponding package. But there is no `vi` package, only a `vim` one: https://github.com/msys2/MSYS2-packages/blob/HEAD/vim/PKGBUILD Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
mjcheetham
approved these changes
Mar 24, 2026
dscho
added a commit
to git-for-windows/MINGW-packages
that referenced
this pull request
Mar 24, 2026
There have been a couple of edits in upstream MSYS2 which we need to integrate into Git for Windows' fork, lest the next Git for Windows version sync will overwrite those edits. This change requires git-for-windows/build-extra#685 to be merged first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For historical reasons, Git configures
vias the default editor, and the Git for Windows project followed suite.As part of collaborating more closely with MSYS2, the
mingw-w64-gitpackage definition of Git for Windows is being synchronized between both projects. And MSYS2 has a different default editor, also for historical reasons:nano.As a consequence, https://github.com/msys/MINGW-packages/aae0c9d1c8 (git: default to nano instead of vim (#28202), 2026-03-01) changed the package definition to build with
nanoas Git's default editor.This hard-coded value would have prevented Git for Windows to maintain its default, and for that reason, the MSYS2 project added another commit, https://github.com/msys/MINGW-packages/d3ff7a1ec7 (git: allow _DEFAULT_EDITOR override, 2026-03-11), to allow Git for Windows to override that default.
This is what we do here: override the default, by setting
_DEFAULT_EDITORtovim.Technically, this is a slight deviation from the previous default, which was
vi. But the package definition uses this variable for two things: to tell Git's build process what the default editor is, and to add the corresponding package. But there is novipackage, only avimone.