Skip to content

Commit 304b5f8

Browse files
authored
please.sh build-mingw-w64-git: configure the editor explicitly (#685)
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).
2 parents 15dc844 + 20b46e7 commit 304b5f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

please.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ build_mingw_w64_git () { # [--only-i686] [--only-x86_64] [--only-aarch64] [--ski
898898
export SIGNTOOL="git ${d:+--git-dir="$d"} signtool"
899899
fi &&
900900
cd ${git_src_dir%/src/git}/ &&
901-
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)} makepkg-mingw $maybe_sync $force -p PKGBUILD.$tag &&
901+
_DEFAULT_EDITOR=vim MAKEFLAGS=${MAKEFLAGS:--j$(nproc)} makepkg-mingw $maybe_sync $force -p PKGBUILD.$tag &&
902902
if test -n "$src_pkg"
903903
then
904904
git --git-dir src/git/.git archive --prefix git/ -o git-$tag.tar.gz $tag &&

0 commit comments

Comments
 (0)