Repository navigation
Description
As I documented in msys2/MSYS2-packages#5177 (comment), Perl will soon be reporting cygwin instead of msys when asking $^O for the operating system, and Git for Windows will have to adjust a couple of lines:
- in
git cvsexportcommit: https://github.com/git-for-windows/git/blob/v2.47.1.windows.2/git-cvsexportcommit.perl#L40 (excluded from Git for Windows' installer since git-for-windows/build-extra@59b521a, i.e. since v2.20.0) - in
git send-email: https://github.com/git-for-windows/git/blob/v2.47.1.windows.2/git-send-email.perl#L1486 - in
git svn: https://github.com/git-for-windows/git/blob/v2.47.1.windows.2/git-svn.perl#L68 (excluded from Git for Windows' installer since ff905f8, i.e. v2.54.0) - in
git request-pull: https://github.com/git-for-windows/git/blob/v2.47.1.windows.2/git-request-pull.sh#L81-L115 (replaced by a pure Bash logic in 7604222, i.e. v2.50.0) - in
/usr/bin/docx2txt.pl, used inastextplain, which is configured as default diff driver for.docxfiles in the systemgitattributesandgitconfig.
Git for Windows' installers already skip cvsexportcommit (among other remote helpers targeting the long-forgotten source code management tools CVS and Arch, remote helpers that upstream Git continues to carry probably only for the sole reason that it would take work to remove them, especially the tedious sort of work that is convincing the core Git developers on the Git mailing list, where even one single person using a feature might well prevent said feature from being deprecated as long as said user is a big name in the Linux world). Therefore my current thinking is that dropping cvsexportcommit (along with the rest of the CVS/Arch stuff) from Git for Windows is a better course of action than actually patching the code.
Likewise, gitweb is excluded from Git for Windows for a long time already: git-for-windows/build-extra@c20f0d6 excluded it, i.e. v2.19.0.
As for git svn: This serves as a fine opportunity to drop git svn support from Git for Windows in favor of redirecting existing users to MSYS2 (after we made sure that this is a viable option).
While we're already on the train of thought to deprecate parts of Git for Windows that require a lot of work for little gain, let's also have a long and hard look at Perl itself. The last two major version upgrades of Perl required me to spend quite a lot of time, and the most recent one failed somewhere, forcing me to postpone the upgrade, with Perl v5.40.1 swooping in before I could even take a look at the problems with v5.40.0. I am spending even more time upgrading MSYS2's own perl package to v5.42.1 after "unshadowing" Git for Windows' own copy of the perl package.
Therefore, I could imagine that a bold (and potentially correct) move would be to replace docx2txt with a trivial non-scripted version and also drop support for git send-email from Git for Windows, which would allow Git for Windows to stop shipping (and thus, building) Perl altogether. We would then redirect existing users to use regular MSYS2 with mingw-w64-git-send-email instead, similar to how we already redirected git svn users that way.
Activity
PhilipOakley commentedon Feb 4, 2025
I appreciate I haven't contributed for a while, but I did (and hopefully will) use
git send-email(andgit format-patch) to contribute to the Git List. What other convenience methods would be recommended if Perl was dropped?I can see the maintenance benefit of dropping all that other clutter but, as noted, ..
git send-emailbeing that usage for me 😃 .dscho commentedon Feb 4, 2025
Is there a Perl version you can easily download? You'd likely have to put in some effort to make
Git.pm/git-send-email.perltruly cross-platform, as there are most likely "All The World Looks Like Unix" assumptions baked in all over the place, if I know Git's source code well.Or maybe you can switch to using regular MSYS2 (I do hope that we're already in a place that is relatively close to MSYS2 being able to consume
mingw-w64-gitupdates from Git for Windows, and if you promise not to bother me with any problems but resolve them yourself, I even encourage you to download and install the Pacman packages from thegit-artifactsrun'spkg-x86_64artifacts).GitGitGadget. Although I have to admit that that project probably needs more engagement from the community, especially development-wise, if it is to be viable for the long term.
I hate to be the one to tell you @PhilipOakley, but you're not a big name in the Linux world, and therefore they wouldn't keep the tool around just for you.
As it were, though,
git send-emailis used heavily by the core Git developers (kind of required, really, due to their choice of running a project without proper project management tools and instead doing everything on a mailing list, includingcodepatch review). So there is no need to feargit send-emaillosing support in the Git project.As for Git for Windows, that's a different story. I am totally willing to abandon support for that if that is the only tool requiring a full Perl and then some modules.
git svnsupport in Git for Windows #5405becm commentedon Feb 21, 2025
Removal of Perl will also impact/kill
docx2txtandgit request-pullfunctionality.usr/bin/docx2txtis a compact wrapper fordocx2txt.plandmingw64/libexec/git-core/git-request-pullhas hidden inline Perl code and call to apply some filter.There is also a direct reference to
docx2txt.plinusr/bin/astextplainwhich needs to then be removed.dscho commentedon Feb 21, 2025
Yup, that has been mentioned here already. We'll either need to drop it, or find an alternative, or rewrite it (which shouldn't be all that hard).
Good find! It sure does.
Seeing as that command is in Git primarily for the benefit of the Linux kernel project (a lot of things seem to be in Git solely for the Linux kernel project, as if it was still a child project...), I could imagine that dropping that script at least from Git for Windows should be no big deal at all.
In the unlikely even that this command should still be needed, those who need it could easily reimplement it in pure C.
mbs-c commentedon Mar 13, 2026
dscho commentedon Mar 13, 2026
mbs-c commentedon Mar 13, 2026
dscho commentedon Mar 13, 2026
dscho commentedon Mar 30, 2026
I just updated the issue description with a checklist of what would need to be done to drop Perl from Git for Windows. Basically, the two remaining items would be:
docx2txt.plas a native.exe. It hasn't changed since 2014, is still at v1.4 from https://sourceforge.net/projects/docx2txt/, and unfortunately lacks any test suite. But I'm confident that this can be done relatively easily, by porting it with AI assistance. It's licensed under the GPLv3, which would be retained across the port. The most involved part would most likely be creating a test suite becausedocx2txtdoes not have any of that.git send-email. This is too involved to rewrite in any other language, and it really is heavy on dependencies because it needs to talk to remote mail servers with a variety of encryption/authentication schemes, all of which are implemented by Perl modules. The best idea I have so far is to redirect existinggit send-emailusers to MSYS2 withmingw-w64-git-send-email, just like we redirect the existinggit svnusers away from Git for Windows already.Thoughts?
dscho commentedon Mar 31, 2026
Here is my attempt: https://github.com/dscho/docx2txt-rs (leaning heavily on Claude Opus 4.6 to do most of the typing).
dscho commentedon Apr 14, 2026
So now that
mingw-w64-docx2txt-rsis a thing, I looked at what is still left in Git for Windows that does use Perl.The command I ran to find the last users of Perl
Let's categorize the results:
./mingw64/libexec/git-core/git-send-emailis the only thing I'd consider legitimately useful for Git for Windows users, and I already outlined the plan to redirect the very fewgit send-emailusers to use MSYS2 directly../mingw64/libexec/git-core/git-instawebis a left-over; it should have been excluded it from Git for Windows when we dropped gitweb in git-for-windows/build-extra@c20f0d6../usr/share/misc/magic.mgccomes from thefilemagic file. It does not use Perl, it characterizes Perl code../mingw64/share/bash-completion/completions/gitand./mingw64/share/git/completion/git-completion.bashare the tab-completion scripts, both of which contain the string--perl-regexpto be able to tab-complete that option; None of them actually call Perl.And the rest isn't much to write home about, it's basically the
docx2txtthing (for which we now have a Perl-less alternative we can use), and some OpenSSL scripts that aren't really useful because they would a) require administrator privileges to write their output, and b) their output would be overwritten every time Git for Windows is updated, anyway.docx2txt stuff (superseded by docx2txt-rs)
vim/nano stuff
<OpenSSL stuff
Left-over Perl/Subversion stuff (not caught by the regular expression)
installer/portable: stop distributing `git-instaweb`
Skip distributing `git instaweb` (#689)
dscho commentedon Jun 5, 2026
And git-for-windows/build-extra#708 is my attempt to migrate to that Rust version of
docx2txt.xxl007xxl1-ai commentedon Jul 28, 2026
dscho commentedon Nov 5, 2026
This was done by the MSYS2 project for us: msys2/MSYS2-packages#6920
dscho commentedon Nov 5, 2026
This needed git-for-windows/build-extra#767 as a follow-up.