Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

What is this MSys thing in MSysGit

Johannes Schindelin edited this page Mar 29, 2014 · 2 revisions

MSys is an environment for Windows offering a Unix-type shell and a Perl interpreter. Because many parts of Git are still not builtins programmed in C, but instead shell and Perl scripts, Git for Windows needs such an environment.

Therefore we ship Git for Windows with a very minimal version of MSys.

MSys is also required to build Git, as we re-use the same Unix-type setup upstream Git uses. We ship a more complete MSys environment, including GCC, as build environment (which is therefore nick-named ''msysGit'').

We compile Git as a pure MinGW program, though, i.e. a program without any link-dependencies on anything but standard Windows libraries. So unless you need to use any parts of Git that are still implemented only as shell or Perl scripts, you can get away with running plain git.exe.

Subversion is too old for git-svn to work properly. Can't you guys keep your software up-to-date?

First of all, you're welcome. No, seriously, your appreciation for how many thousands of hours of work have been poured into Git for Windows to make it what it is today is very heart-warming. The fact that you dedicate a couple of seconds of your life together with your impressive command of the English language to express your gratitude reflects favorably on you.

The fact that git-svn is supported on Windows at all is the result of multiple months of hard work of a few very dedicated developers you might just as well be grateful for. If more people would have kept that in mind, and offered gratitude instead of whining, it is possible the principal developer behind that effort would still be interested to work on it.

Now to the technical reason why Subversion support was not upgraded in a long time: It is really tricky to build. git-svn is actually a Perl program, so it uses the Perl shipped with MSys (see this question for details). As git-svn is a Perl program, the Subversion binding used by git-svn is actually a Perl extension. It is not trivial to compile that extension on Windows (due to its lack of POSIX support and due to the lack of so many tools Unix developers take for granted), and so far nobody has successfully completed a Subversion upgrade.

So: what is the solution? Ideally, someone who needs it badly enough to tackle the upgrade of Subversion, contributing the work back to the msysGit project. This is Open Source, after all, therefore everybody is welcome to work on it. You could even offer money for somebody else to do it for you. One thing is almost certainly not going to work, however: complaining and trying to bully volunteers who do not need Subversion integration to fix your problem; that only will accomplish only two things: to make you look bad, and to make sure that our loss of interested developers is permanent.

The 'Perl' version you ship is awfully old!

That is true. It is not particularly easy to upgrade it, either.

The reason is that we need to have an MSys version of Perl because we did not manage to compile the Subversion modules (which are written in C using POSIX features plain Windows does not offer, hence the need for MSys).

I want to upgrade Perl. How do I do that?

First of all, you need a development environment. Download and install the one-stop msysGit development environment installer. This will install the development environment and build an up-to-date Git version in it. You definitely want to install this development environment into a directory whose path does not have spaces in it. For example, C:\Program Files (x86)\msysGit is not a good place while C:\msysGit is.

To be able to open the development environment quickly again, you might want to install a desktop icon using the method suggested in the default message of the command-line window which was kept open at the end of the installation procedure: /share/msysGit/add-shortcut.tcl desktop.

Second, you need to switch to the 'MSys' development environment. By default, msysGit is set up to compile MinGW programs, i.e. plain Windows programs that do not use any POSIX features. In contrast, the Perl-Subversion modules require POSIX features that are supported by the POSIX emulation layer MSys (see also What is this "MSys" thing in "MSysGit"?). To switch to the 'MSys' development environment, close all msysGit windows, install Git for Windows, start a Git Bash and switch to the msys branch: cd /c/msysGit/ && git fetch && git checkout -t origin/msys.

To build the current Perl, all you have to do is to call /src/perl/release.sh.

To upgrade Perl, that file -- /src/perl/release.sh -- has to be modified. Unfortunately, it is usually not enough to update the version number and MD5 checksum. Typically, the build will fail after doing that, which means that patches are needed. The patches required for the current Perl version are located in /src/perl/patches/ and will be applied automatically by the release.sh script.

The process is now to switch the directory to /src/perl/perl-<VERSION>/ (which is now a Git repository in its own right) and patch the sources until make passes. Then, those changes need to be committed and to be exported to /src/perl/patches/ using the command git format-patch -o /src/perl/patches/ -<NUMBER> where <NUMBER> is the number of commits on top of the initial one.

The 'OpenSSH OpenSSL' version you ship is old!

True. Just like the Perl version, this needs a little effort to make a newer version easy to apply, by a willing volunteer.

For instance, see: https://github.com/msysgit/msysgit/issues/31 (currently closed) and then https://github.com/msysgit/msysgit/wiki/InstallMSysGit#how-to-install-it, along with a search of the msysgit Mail Archives e.g. https://groups.google.com/forum/?hl=en_US?hl%3Den#!searchin/msysgit/OpenSSH, to get the relevant background, as this is just waiting for someone to get in among this task, draft a solution and issue a pull request. Remember that we need a msys openssh, so you have to checkout the msys branch in the msysgit project.

Clone this wiki locally